in reply to How to get over 'premature end of script headers' in Apache?
Make sure there's an empty line after the HTTP headers (such as "Content-type:") and before the body text. For example, print "Content-type: text/html\n\n";
Forgetting that empty line will result in a "500 Server Error" being sent to the client, and a "Premature end of script header" message being written to the server error log, so it could be the source of your problem.
|
|---|