CGI Help
If you're having trouble getting your CGI scripts to work, check the
following:
The name of the file must end in ".cgi" (all lower case) -
otherwise, the server can't tell that it's a CGI script.
"myscript.CGI", "myscript.pl", and "myscript.sh" *won't* work.
Are the permissions set properly? A CGI script must be world-readable
and world-executable to work. If you're getting '403 forbidden'
messages, that's probably the problem.
To fix it from your Unix shell, type "chmod 755 myscript.cgi"
To fix it from your FTP program, find the option for "Change Permissions"
(or something similar), and make sure that User, Group, and World are
allowed to read and execute the file. User should also be allowed to
write the file, but Group and World shouldn't (unless you want *everyone*
to be able to change your CGI script...).
If it's a script, is the command in the upper line set properly? The
first line of a Perl CGI script should be:
#!/usr/bin/perl
Is the CGI a script, or a compiled application? If it's a script,
it will be readable in a text editor. We strongly recommend against
using compiled CGI scripts - they're harder to check for security holes,
and they only work on machines running the same (or similar) OS and CPU
to the one they were compiled for. We're running on PCs and Macs using
Linux now; if we upgrade to a SPARC or Alpha, all compiled CGIs will
need to be recompiled before they'll work on the new machines.