adding apache2 ErrorDocument 500 support
| From: | Jeremy Jackson | Date: | Wed, 22 Apr 2009 21:27:51 +0000 |
| Subject: | adding apache2 ErrorDocument 500 support | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-43758@lists.php.net to get a copy of this message | ||
In looking into setting custom ErrorDocument with apache2, I see from
NEWS file:
30 Aug 2007, PHP 5.2.4
- Changed error handler to send HTTP 500 instead of blank page on PHP errors.
(Dmitry, Andrei Nigmatulin)
And indeed it seems that the PHP core now sets it in main/main.c line
985, but the SAPI apache2handler can only return status 404
HTTP_NOT_FOUND, HTTP_FORBIDDEN, DECLINED or OK to apache2 core in
sapi/apache2handler/sapi_apache2.c around line 499 function
php_handler().
Would it be possible for the SAPI for apache2 to return
HTTP_INTERNAL_SERVER_ERROR, so that Apache2's ErrorDocument can be
triggered on E_PARSE errors?
--
Jeremy Jackson
Coplanar Networks
(519)489-4903
http://www.coplanar.net
jerj@coplanar.net