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.


In reply to Re^2: Not your normal " Premature end of script headers:" by mr_mischief
in thread Not your normal " Premature end of script headers:" by yegg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.