What is a CGI?
CGI (Common Gateway Interface) adds functionality to your website
by allowing you to run scripts and programs. Examples are processing
forms, searches, forums and shopping carts. CGI programs can
be written in a number of languages, including PERL and C,C++.
Path to Perl
For perl scripts ensure to to have #!/usr/local/bin/perl as
the first line of file.
Installed perl modules are at /usr/local/lib/perl5
Operating System
Our OS is Sun SPARC Solaris 2.6
CGI Extension
CGI scripts must have a .cgi extension.
CGI-BIN
Do not use the directory name "cgi-bin" this is reserved
for system use, simply name your cgi-bin directory - cgibin
(no dash).
File Permissions
Use Chmod or for accounts without Telnet access, set file permissions
by choosing properties with an FTP client - We recommend AceFTP.
Shareware version, or you can buy the full version from us.
- Execute
CGI scripts need execute by all permissions (755) to be
executed properly.
- Write
For scripts that must write to the server, you must chmod
them and the appropriate files and directories 777
Sendmail
You must not use sendmail for sending UCME (Unrequested Commercial
Mass Email - (Spamming))
Path to Sendmail is: /usr/lib/sendmail
CGI Troubleshooting
- Upload any text-based scripts using FTP's ASCII/Text mode.
- For perl scripts ensure to to have #!/usr/local/bin/perl
as the first line of file.
- Double-check the permissions (needs at least 755).
Most trouble is caused by inncorrect File or Directory
permissions. Double check the file and or directory is writable
if you are trying to write and ensure the directory containing
the CGI script is World Executable and the script is Also
World Executable.
For
Some examples of CGI Applications you can use on your
web site, please view: Web Site
Addons
|