#50921 [Opn->Bgs]: '200 OK' HTTP status despite PHP error
From: jani@php.net Date: Wed, 03 Feb 2010 10:06:27 +0000 Subject: #50921 [Opn->Bgs]: '200 OK' HTTP status despite PHP error References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-147178@lists.php.net to get a copy of this message
ID: 50921 Updated by: jani@php.net Reported By: phpbug at starurl dot com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: Windows IIS6 PHP Version: 5.2.12 New Comment: It does happen. It requires that: 1) display_errors = off 2) No headers have been sent yet by the time the error happens 3) Status is 200 at that time. Previous Comments: ------------------------------------------------------------------------ [2010-02-03 04:23:42] phpbug at starurl dot com Description: ------------ My host runs PHP v5.2.12 (confirmed via phpversion) on IIS6 (Windows Server, unknown version). When a PHP error occurs (parse error, runtime error, etc), a "200 OK" HTTP status is returned, instead of the correct "500 Internal Server Error". This is despite claims in the change history for v5.2.4 that this issue was fixed: "Changed error handler to send HTTP 500 instead of blank page on PHP errors. (Dmitry, Andrei Nigmatulin)". This doesn't appear to be the case on IIS6 (monitored remotely via HTTP Spy). Reproduce code: --------------- <? x = y; // cause parse error ?> Expected result: ---------------- Parse error mesage and "500 Internal Server Error" HTTP status code. Actual result: -------------- Parse error mesage and "200 OK" HTTP status code ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50921&edit=1
Thread (33 messages)
- #50921 [Opn->Bgs]: '200 OK' HTTP status despite PHP error
- #50921 [Bgs]: '200 OK' HTTP status despite PHP error
- #50921 [Bgs]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Nab]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Nab]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Nab->ReO]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [ReO]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [ReO]: '200 OK' HTTP status despite PHP error
- Bug #50921 [ReO]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
- Bug #50921 [Com]: '200 OK' HTTP status despite PHP error
| « previous | php.bugs (#147178) | next » |
|---|