I'm doing some development work on a Fedora box with Apache 2. For some reason, I can't get even the simplest CGI scripts to work. Any script that I try to execute through the web gives me "Premature end of script headers". I've checked the Apache error log, but it also only says "Premature end of script headers". I can run the scripts from the command line and they execute as expected. Any ideas? I typed the following script directly into emacs via ssh, so I'm pretty sure it isn't an issue of having hidden characters in my script.
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<TITLE>CGI Test</TITLE>";
print "</HEAD>";
print "<BODY><H2>Hello, world.</H2>";
print "</BODY></HTML>";
Thanks!