in reply to Premature end of script headers

Many times the error "Premature end of script headers" occur not because, our heads are bad, but because a previous error written "\n\n" to the output before our "\n\n".

Checks, file permissions, missing libraries, server config, etc ...

Replies are listed 'Best First'.
Re^2: Premature end of script headers
by moritz (Cardinal) on May 11, 2010 at 12:14 UTC
    I'd like to add that it's often interesting to just start the script from the command line - often it's obvious from the output what the problem is.

    (Yes, you can run a CGI script without CGI. No, it won't kill any kittens.)

      you're right, but in this case I vote for a bug in file permissions, without running the script on any site :-)