php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36927 Fatal errors should return a 500, not 200
Submitted: 2006-03-31 00:09 UTC Modified: 2006-04-03 12:56 UTC
From: tac at smokescreen dot org Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.1.2 OS: ALL
Private report: No CVE-ID: None
 [2006-03-31 00:09 UTC] tac at smokescreen dot org
Description:
------------
Fatal errors, including compile errors, return a status code 200, rather than a 500 (Server Error), which should be the default.  It would make it easier to see problem pages in our logs if the pages returned a 500, since indeed there is a server error.

I realize that in some cases the text has already been sent, but if buffering is on, then the behavior should be to return a 500.

Reproduce code:
---------------
<?php $x = new bad_object(); ?>

Load the page, look at the header.  It's a 200, should be a 500.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-03 12:56 UTC] tony2001@php.net
Duplicate of bug #36636.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 04:00:02 2025 UTC