#18824 [NEW]: PHP should produce an appropriate status code when an error is encountered

From: Date: Fri, 09 Aug 2002 06:09:34 +0000
Subject: #18824 [NEW]: PHP should produce an appropriate status code when an error is encountered
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16354@lists.php.net to get a copy of this message
From: bugs.php.net@mnot.net Operating system: unknown (maybe FreeBSD?) PHP version: 4.2.2 PHP Bug Type: Feature/Change Request Bug description: PHP should produce an appropriate status code when an error is encountered I don't use PHP, I'm just a protocol weenie. I encountered the following from travel.yahoo.com tonight: HTTP/1.1 200 OK Date: Fri, 09 Aug 2002 06:02;01 GMT Connection: close Content-Type: text/html <br /> <b>Fatal error</b>: Cannot instantiate non-existent class: travel in <b>/home/y/share/htdocs/t/index.php</b> on line <b>19</b><br /> Fine, except that it gives a 200 OK status. The right thing would be to generate a 500 Server Error status; this indicates that something is wrong in a machine-understandable way, which is good. It shows up in the logfiles. Agents (like Google) understand that all is not well. Please modify PHP to generate appropriate status codes. 500 is just one example; have a look at RFC2616 for other status codes that you might want to map machine-understandable semantics to. Cheers, -- Edit bug report at http://bugs.php.net/?id=18824&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18824&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18824&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18824&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18824&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18824&r=support Expected behavior: http://bugs.php.net/fix.php?id=18824&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18824&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18824&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18824&r=globals

« previous php.bugs (#16354) next »