PHP emitting 500 on errors - where is this documented?

后端 未结 1 661
时光取名叫无心
时光取名叫无心 2020-11-27 08:01

In this question the OP mentions PHP throwing a 500 error automatically when error_reporting is off, and XDebug changing that behaviour.

That got me cur

相关标签:
1条回答
  • 2020-11-27 08:58

    Not sure, but this may have been added in PHP 5.2.4:

    • Changed error handler to send HTTP 500 instead of blank page on PHP errors. (Dmitry, Andrei Nigmatulin)

    There is also this discussion on the internals list that might be related:

    • [PHP-DEV] FW: php fastcgi

    Quoting:

    Current time most PHP instalations use setting 'display_error=0'. This setting hides errors from user but may send to him just a blank page.

    The proposed patch sends HTTP 500 response on errors instead of blank pages. The pages that already wrote something are not affectd.

    Any objections or additions?

    and the proposed solution/patch seems to be shown here:

    • http://www.mail-archive.com/internals@lists.php.net/msg28557.html
    0 讨论(0)
提交回复
热议问题