in reply to Re: Not your normal " Premature end of script headers:"
in thread Not your normal " Premature end of script headers:"

To be more accurate, it means the process Apache is calling produces an insufficient set of headers. There need not be any output at all, let alone at any specific point in time relative to something else. If there is no content-type header, the error is issued.

The lack of output or incorrect output could be caused by many things. It could be caused by STDOUT being redirected elsewhere. It could be an error condition in the shell or the script interpreter/compiler is the only output. It could mean the script runs but produces no output at all. It could mean the output is in the wrong order, or that it doesn't include the content-type header at all.

The reason for the error is often found in the error log, such as

[Mon Jun 23 10:05:39 2008] [error] [client 192.168.1.253] (13)Permissi +on denied: exec of '/var/www/vhosts/chris.test/foo.pl' failed
which would then be followed in the stock error log format by another entry like
[Mon Jun 23 10:05:39 2008] [error] [client 192.168.1.253] Premature en +d of script headers: foo.pl

If the script simply produces no output at all or produces output which doesn't include the content type header, you'll just get the one error logged about premature end of script headers.