CGI queries and their solutions.
1. Make sure the Perl path is set to /usr/bin/Perl
2. Make sure the .cgi/.pl file was uploaded to cgi-bin folder
3. Make sure the .cgi/.pl file was uploaded in ASCII mode.
4. Make sure to CHMOD the script to 755.
If this does not works contact your web hosting company 24×7 technical support.
I edit my CGI script, and then it no longer functions. Why?
Perl CGI scripts must be uploaded to your account via FTP as ASCII files to run properly. Also, all CGI hosting scripts must be executable. This requires setting the permissions on the file using your FTP hosting program and making sure the script is executable globally (CHMOD).
If you are getting an “Internal Server Error” and you have verified the CGI script was uploaded as an ASCII file and it is executable, there may be a syntax error in the code. The easiest way to determine this is to telnet into your web site hosting account, go to the directory that contains the script (cd www/directory), and run the program from the prompt by typing in the name of the script. This will show the error in the program.
Why is it that my CGI script will not write to a file on the dedicated server?
All CGI scripts that are called from the web do not run with your account’s permission by default. This is for security reasons. The CGI scripts run as the user ‘nobody’, which is a fake username with no permissions. Because of this, any file or directory that you want a script to write to must be globally writeable (CHMOD 777); this includes files such as .rdb, .dat, .txt etc.