CGI errors can occur for any number
of reasons. Here are five of the most common.
The line #!/usr/local/bin/perl must appear as the first
line in the script.
The script has not been made executable. Issue this FTP
command...
chmod 755 filename
Some FTP clients require that the CHMOD command be preceded by the
SITE command and/or the QUOTE command. See "What is FTP and how do I use it?" for more
information about FTP.
Your script may have carriage returns in it (^M or ASCII 13). They need
to be stripped or replaced by linefeeds (^J or ASCII 10). Try uploading the
file in text mode, rather than in binary mode.
The filename must end in .cgi, .pl or .sh.
The Content-type statement must be present in scripts that print to
standard out.