[clug] Weird 500 error - script not executing?
Owen Cook
rcook at pcug.org.au
Sat Jul 9 04:57:09 GMT 2005
On Sat, 9 Jul 2005, Paul Wayper wrote:
>
> [...] Premature end of script headers: subs.cgi; referer
> http://localhost/[...]/email.cgi
>
> The script is set executable by all, and I can run it and it gives the
> outputs I expect. It's being posted to by the referer, which is in the
> same directory and runs fine. I've put warn statements in the script and
> it doesn't seem to execute them - it's as if something stops the script
> running before it actually executes the script at all. I've tried renaming
> the file in desperation, to no effect.
>
> What other ways could apache call the script that would differ from the
> command line? What else could cause this problem?
1. does the shebang line point to where perl is
2. have you run the script through a dos2unix script in case you have
inherited dos carriage returns
There are three other reasons but not on the top of my head, but try
especially number 2
Owen
More information about the linux
mailing list