Re: why do we not set http 500 for errors when the display_error is enabled
| From: | Dmitry Stogov | Date: | Wed, 25 Jun 2014 13:30:37 +0000 |
| Subject: | Re: why do we not set http 500 for errors when the display_error is enabled | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75069@lists.php.net to get a copy of this message | ||
We can't set 500 response code if HTTP headers were already sent.
We also don't set 500 response code if display_error is "on", because
browsers won't show the actual page with error message (may be it was just
IE6 or below and it's not a problem anymore).
Thanks. Dmitry.
On Wed, Jun 25, 2014 at 1:06 PM, Ferenc Kovacs <tyra3l@gmail.com> wrote:
> Hi,
>
> I've just got notification about
> https://bugs.php.net/bug.php?id=50921
> (because I was commenting on the past). I've checked why do we not set http
> 500, and found this:
> http://lxr.php.net/xref/PHP_5_4/main/main.c#1154
> it was added with
>
> http://git.php.net/?p=php-src.git;a=commit;h=8039433291bd4fa36c897e93047d1ebd538dadbb
> for fixing https://bugs.php.net/bug.php?id=42722
> I'm a little bit confused how is that change fixing the originaly reported
> problem (fatal errors doesn't show up in the output even though that
> display_errors is enabled and error_reporting is set to E_ALL).
> I don't think that the current behavior is correct, could somebody tell me
> what did I missed?
>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu
>