I get a '500 Server error' or '403 permission Denied' error when I try to run a cgi script.
Print
75
The most common problem that people have with cgi scripts is the permissions on the script. In order for a script to run, it must have execute permissions. If you are getting this error:
Forbidden You don't have permission to access /cgi-bin/test.pl on this server.
You need to change the permissions to '755'. You can do this with most ftp clients, or through ssh.
The next most common problem is the 'mode' that you upload the script in. (i.e., from your editor to the server). You need to configure your ftp client to upload ".cgi" and ".pl" files in "ASCII" mode. The error you will receive if you do not upload in ASCII mode is:
Internal Server Error Premature end of script headers: /home/you/cgi-bin/script.cgi
If you still are getting an error message, chances are that there is a syntax error in your script. For more information regarding this matter, contact Support@4goodhosting.com