PHP 5.2.4 Errors Will Be 500 Errors

Considering how old and popular PHP is, it’s hard to believe that this issue hasn’t been addressed before now…

Gregory Szorc just noticed that one of the changes to PHP 5.2.4 is that PHP errors, which used to result in an unhelpful blank page with an HTTP 200 status code, will now send an HTTP 500 status code instead. Then your web server can handle the 500 error with a default “Sorry, a server error occured” page. It’s not only much cleaner but it is the way HTTP status codes are meant to be used.

PHP 5.2.4 isn’t out just yet, but should be very soon. It’s currently being tested as a final release candidate.

Bookmark and Share

Leave a Reply