|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
CGI Please Help
aight i hope i am posting in the correct place... sry if i'm not but i have a website that i am trying to give a boost onto... How do i run cgi script. I got a login page that is cgi and i don't know how to run it.. My setup is a file with my web page stuff in it like 2 htm docs and a cgi-bin folder... Also if you know of a free managable login for my site that allows people to signup that would b great to.l.. thanx for the help... zacharytest.cjb.net
|
|
#2
|
|||
|
|||
|
RE: CGI Please Help
put the cgi script into your cgi-bin change the permissions to 0755. You should be able to execute it now
|
|
#3
|
|||
|
|||
|
RE: CGI Please Help
I dont understand how to do that and how do i call it from a html file... Thanx for that tip but can u goto more depth please
|
|
#4
|
|||
|
|||
|
RE: CGI Please Help
Explain what type of cgi it is? is it like a form processor?
|
|
#5
|
||||
|
||||
|
RE: CGI Please Help
CGI a set of rules that say how a web server and other programs on the same machine can talk with each other.
A CGI script runs on the server machine. It accepts it's input from the web server and then sends the output back to web server (and thus back to the user). Oftentimes CGI confused with programming languages such as Perl or Python. It is not a language... CGI is the interface between a server and a program. A CGI script is just code which uses CGI. There are many different ways one can set up and run CGI scripts, but no matter how one does it, there must be two conditions met: 1) the script must be considered executible, and 2) the web server must recognize the script as a CGI. CGI scripts must be executable. In the *nix world, this is done by modifing the access permissions of the file with the chmod command. How you access your host will dictate how you execute a chmod; you may be able to execute it directly on a command line or you may need to execute it through your FTP software. The permissions should be set so that the owner of the file can read, write and execute it. Those in the group or others should only be able to read and execute it. This translates to permissions of 0755, or rwxr-xr-x . A nice little utility to help determine permission numbers can be found at www.liepins.de/stuff/chmod.php. How a server application will recognize a script is a CGI script as opposed to any other executible depends on how the server has been configured. Most commonly, the file extension must be .cgi. Some adminstrators may also require that CGI scripts be in a certain directory (for security auditing purposes). Traditionally, this directory is named cgi-bin. If the script looks like a CGI (ends in .cgi), smells like a CGI (is executable) and tastes like a CGI (located with in the cgi-bin directory), chances are the web server will think it's a CGI and try to communicate with it. If not, you'll need to configure your web server (or talk to your system administrator). The next hurdle is to actually make the end user able to access the CGI script. Again, there are several ways to accomplish this. The most common are accessing it directly or including it with Server Side Includes (SSI+). To access it directly, the user would follow the an address that points to the script, such as www.example.com/cgi-bin/login.cgi. SSI+s are directives placed within an HTML document which link to the output of the CGI script, and typically take the form <!--#command attribute="value" -->. These pages may also require a special extension (tranditionally .shtml) depending on the server configuration. The SSI+ comamnds you'll probably find the most relavant are include and exec: <!--#exec cgi="/cgi-bin/login.cgi" --> <!--#include virtual="/cgi-bin/login.cgi" --> I would recommend reading Chapter 14 (Server-Side Includes) and Chapter 16 (CGI and Perl) of Apache: The Definitive Guide by Ben and Peter Laurie if you want to learn more about configuring a server (obviously Apache) and implementing SSI+ and CGI. But, you'd probably want to see if the book is available at your local library or if a friend will loan it to you; the rest of the book isn't worth the $39.95/61.95 US/CAN price. Best of Luck. -Tim |
|
#6
|
|||
|
|||
|
RE: CGI Please Help
Thanks Tim, But I meant what king of script is he having problems with, not really what is a cgi
Thanks for the long explaination though. |
|
#7
|
||||
|
||||
|
RE: RE: CGI Please Help
Yeah, I know you knew... but I was trying to provide a thorough explaination for DarkDrift.
I couldn't believe I wrote that much, though. lol -Tim |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > CGI Please Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|