Bug #50921 [Nab]: '200 OK' HTTP status despite PHP error

From: Date: Wed, 25 Jun 2014 08:10:03 +0000
Subject: Bug #50921 [Nab]: '200 OK' HTTP status despite PHP error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186334@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50921&edit=1

 ID:                 50921
 Updated by:         tyrael@php.net
 Reported by:        phpbug at starurl dot com
 Summary:            '200 OK' HTTP status despite PHP error
 Status:             Not a bug
 Type:               Bug
 Package:            HTTP related
 Operating System:   *
 PHP Version:        5.2.12
 Block user comment: N
 Private report:     N

 New Comment:

the xdebug issue was a separate problem, and is indeed fixed.
what is still not "fixed" is that if you enable display_errors, then the error message
itself will trigger sending out the response which sets the http 200 implicitly.
if we go ahead and change this, we should make sure to only add the http 500 when the script
execution is actually terminated by the error(for example E_RECOVERABLE_ERROR will or won't
stop the execution based on the return value of the user defined error handler) as we don't
wanna start sending http 500 responses for every notice and stuff.


Previous Comments:
------------------------------------------------------------------------
[2014-06-24 22:01:27] derek at derekperkins dot com

This is an error for us as well, running on 5.4.28 on Google App Engine, with and without XDebug.
This definitely needs to be fixed.

------------------------------------------------------------------------
[2014-06-02 15:21:26] brenjt at gmail dot com

I can also confirm the issue still exists: PHP Version 5.4.16

------------------------------------------------------------------------
[2014-04-28 14:40:54] ruben at rubensayshi dot com

still having this issue with "PHP Version: 5.4.27-1+deb.sury.org~precise+1" with xdebug
turned on or off, doesn't seem to make a difference ...

display_errors off does, as already stated by others.

------------------------------------------------------------------------
[2013-05-28 21:42:30] kwintersnc at gmail dot com

According to http://bugs.xdebug.org/view.php?id=587 this is
fixed in PHP 5.4, so 
"Not a bug" isn't correct.

------------------------------------------------------------------------
[2013-04-13 19:01:39] matteosistisette at gmail dot com

The status is wrong. And oh my god, since 2010!!

This IS a bug.

Display_errors off means don't DISPLAY errors, it shouldn't have any effect on 
the response code.

Default response for fatal errors should be 500 whether or not display_errors is 
turned on.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=50921


--
Edit this bug report at https://bugs.php.net/bug.php?id=50921&edit=1


Thread (33 messages)

« previous php.bugs (#186334) next »