I've got PERL scripts running on my site in my /cgi-bin as we speak. Today I tried adding a new one: prints.cgi (the name isn't important, as you'll see). I upload it, chmod 755, try to run it from the web: 500 Internal Server Error. I look in the error.log: Premature end of script headers."
All right. I write a little Hello World script.
print "Hello world!";
I upload that, chmod 755, try to run from the web. 500 error, premature end of script headers.
I telnet in and run it with "perl helloworld.cgi" just to see if it'll run in SSH. It does! But it won't run from the web.
What kills me is I have lots of other scripts currently running in that same /cgi-bin directory that run from both command line and the web, with no trouble. But I can't seem to add a single new one!! Help!