In addition to what has already been noted, the script has to be executable by the web user, permissions for actions to be performed by the script have to be appropriate (e.g. if files are to be written to, they have to be writable by the web user), and finally, the cgi script usually has to be in some appropriate directory (such as .../cgi-bin) which is recognized by the web server. (You didn't say what OS or web server (if any) you are using.) Errors in the HTML can also sometimes cause a problem, although it is more likely to be one of the previous mentioned. You should also be sure your script will run from the command line.