I wrote a very basic cgi script but it doesn’t work

If you are trying to write a basic “hello world” type cgi but keep getting:

500 error response – Internal Server Error

Make sure the first line of output from your script is:

print “Content-type: text/htmlnn”;

All cgi’s (in any language) need to output a header line, followed by two newline characters (n) before any “regular” output is done from the script.

Also, check that you have made the script executable :

From the ssh command line, issue this command :

chmod u+x name_of_script here

or from inside most FTP programs:

1. click properties for the file and select “Change permissions” or “chmod”

The wording will vary from one FTP program to another.