Support : CGI
What is CGI?
CGI stands for Common Gateway Interface. CGIs allow you to run small programs from your webpage, such as counters and guestbooks.
Location of common files
The following is a short list of common file locations:
perl: /usr/bin/perl
sendmail: /usr/bin/sendmail
To run CGI programs
Follow these guidelines:
- executable files must be in your public_html/cgi-bin/ directory for security reasons
- executable files must be uploaded in ASCII format, and not binary format
- executable files must have file permissions set to allow execution
- executable files must not be writable by anyone other than yourself. This can easily be done when you are uploading the files, or if your FTP client allows you to type manual commands, do:
chmod 711 thefilename.cgi
afterwards, the file permissions should then look like (usually on the left side):
-rwx--x--x
This is done for security reasons so people cannot edit your code and compromise your account.
By following these guidelines, you should have no problem running your own CGIs. If you are still having trouble or want more examples and information, try reading the excellent Zhanshou's CGI Tutorial and Apache's suEXEC documentation for more information.
Additional Information
Go to Apache's CGI documentation for detailed information on setting up and using CGIs.
For free CGI scripts and tutorials, visit:
Bignosebird.com CGI Tutorials
CGI Resource Index
Dmoz.org CGI Collections/Directories
|