2

I am getting the following error in Apache's log file:

[Sat Apr 13 18:11:07 2013] [error] [client x.x.x.X] Premature end of script headers: index.php

I have a couple of ideas as to what could be causing it, but my application is pretty big and index.php is the point of entry for everything. Is there any way to configure Apache or PHP to log more information, like a backtrace or the complete URI?

Matt
  • 222
  • 2
  • 8

1 Answers1

4

For Apache, set the LogLevel to debug in your apache configuration file. If you are trying to debug mod_rewrite issues, then you use the trace setting. Say,

    LogLevel debug rewrite:trace3

Check the following link from the official documentation.

For php, set the following lines in your php.ini configuration file. Make sure you disable it after you resolve the issue. It is not recommended to be 'On', especially in a production server.

error_reporting  =  E_ALL
display_errors = On
Daniel t.
  • 9,291
  • 1
  • 33
  • 36
  • Thanks, that worked. I left display_errors off because I haven't been able to reproduce the bug, but the debug rewrite:trace3 was exactly what I was looking for. Much appreciated! – Matt Apr 16 '13 at 07:19