My CGI script is returning “Document contains no data”. Whats wrong?
A common cause of this is uploading the script or any files it uses in binary mode. Make sure that not only the script but any associated files are all uploaded in ASCII mode. Also make sure that you upload to the correct hostname (see uploading instructions), as not doing so can cause your script to not work temporarily. If that doesn’t fix things, then check whether the first line of the script or the file mode is correct; see above for the steps to follow. If neither of those is the problem, then there’s probably an error in your script somewhere that’s occurring before the script outputs any data; you’ll have to test it yourself. Another thing to check for in Perl scripts is the presence of “require” lines, usually near the top of the file; if there are any such, you’ll need to find the files named in those statements. For example, if you see a line: require(“cgi-lib.pl”); you’ll need to find the file “cgi-lib.pl” and install it on your account as well, in the same directory as the