On 02/13/2012 05:55 PM, Ferenc Kovacs wrote:

It is implemented already, php will report HTTP 500 on fatal errors, except
if the headers were already sent.
And I also remember a php/xdebug bug, which caused the headers to be sent
see http://bugs.xdebug.org/view.php?id=587 and
https://bugs.php.net/bug.php?id=50921
Derick fixed it in 5.4
So I would suggest you to double-check that you aren't using xdebug when
you experience the problem, and that you don't send out the headers before
your code blows up.

I know about xdebug bug, and xdebug is not even installed. I have same issue on CentOS v5 with original 5.1 RPMs, v5.2.17 from Atomic, v php53 5.3.3 from CentOS 5.7, and finally on Debian with php v5.2.6.

I've tried this code:

<?php
ini_set('display_errors', 0);
$x = y();
?>

and I get this in logs:
IPADDR - - [13/Feb/2012:18:03:52 +0100] "GET /~username/test/ HTTP/1.1" 500 20 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"

so, 500 headers are returned but internal server error page is not displayed. All I get is a blank page.

So apache directive "ErrorDocument 500 /500.html" is useless in this case.


--
Jakov Sosic
www.srce.unizg.hr

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to