[quote]I recently moved by website hosting to dream host. The perl script that I used will not work in dream host. I believe that everything is set up correctly.
Has anyone else run into this issue?[/quote]
I would think a lot of people have run into this issue before. Fustrating isn’t it? I would think you would want help getting the script to run though. “will not work in DreamHost” is not so helpful in diagnosing the problem though.
When the web server goes to run a Perl script, it does a couple of things. First the script file must have proper permissions. It must be executable. Second, the first line of the script file must inlcude a “shebang” with the path to perl (the program). Also use a .cgi or .pl extensions.
- Filename extension is .pl or .cgi ?
- Executable? (set to 755)
- First line is one of the two:
At this point if the conditions above aren’t met, your error.log file with have a messages indicating something to that effect, like “Permission denied” etc
Moving on given that Apache finds the script file and gets perl running…
When perl is running, it has to compile the script and there might be errors at this point. Also given the the script compiles OK the script might have more errors when it is actually running. The web server exepcts perl to spit out a set of “headers” though. If perl spits out error messages first, you will get an internal server error. Given that a script compiles ok, sometimes they are smart enough to spit out headers first before error messages when running.
- Check error.log if “Internal Server Error”
- An entry for “Premature end of headers” indicates most likely an error occured before script could output a set of headers.