On Mon, Feb 13, 2012 at 5:50 PM, Jakov Sosic <jakov.so...@srce.hr> wrote:

> Hi.
>
> I don't know if this is the right group to ask this kind of question, but
> if it isn't please excuse my french ;)
>
> As far as I can see, PHP does not report back to Apache error 500 in case
> of a syntax error in code but displays empty page. For example this code:
>
> <?php foobar();
>
> always returns empty page.
>
> I was curious, so I googled little around and found this old entry from
> this mailing list:
>
> http://marc.info/?l=php-**internals&m=124043575308005<http://marc.info/?l=php-internals&m=124043575308005>
>
>
> So if that's true, and if I understand it correctly, there is no way for
> Apache to display error 500 in case of PHP syntax error?
>
>
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.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to