|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34249 apache crash / error on php error document
Submitted: 2005-08-25 16:23 UTC Modified: 2005-10-26 17:09 UTC
From: jeroen at terena dot nl Assigned: tony2001 (profile)
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-10-26 (cvs) OS: *
Private report: No CVE-ID: None
 [2005-08-25 16:23 UTC] jeroen at terena dot nl
Please see

I'm still experiencing the same bug in 5.1RC1

Any custom error document other than a PHP document works. If I use a PHP document no code gets executed it  just seems to ignore the error document. Occaisionally I get an even  weirder response like Apache trying to send the original file (jpeg in my case) anyway. This ofcourse doesn't work.

I'm using PHP5.1RC1, Apache2 on Debian Linux.

Reproduce code:

ErrorDocument 404 /404.php

can leave it empty

Expected result:
empty page or whatever code was put in 404.php

Actual result:
displays referring page in mozilla. 
IE shows its "page could not be displayed" document.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-25 17:04 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-08-29 10:46 UTC] jeroen at terena dot nl
Yep, it works fine with the CVS version.
 [2005-10-26 14:14 UTC]
I'm reopening this since I'm seeing this again. 
Ilia, you fixed this last time, but this line is suspicious:


if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {

It crashes since (in this case) the parent_req->handler is null. strcmp() didn't like that. :)

 [2005-10-26 15:29 UTC]
Assigning to the guilty party. Antony, your fix for bug #34581 broke the fix for this bug.

 [2005-10-26 15:53 UTC]
Jani, if you change this line to:
if (parent_req && parent_req->handler && ..
Does it fix the issue?
 [2005-10-26 17:09 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 15:01:27 2023 UTC