Another common mistake is to put your cgi script in the html root directory, instead of the cgi-bin directory. Most servers are set up to serve out anything in html root by just delivering the page or file. It will only be executable in your cgi-bin directory, or any directory setup in the server configuration file to execute cgi scripts.