|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24958 ErrorDocument do not work with unexisting *.php
Submitted: 2003-08-05 23:01 UTC Modified: 2003-08-06 17:34 UTC
From: Xuefer at 21cn dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.3RC2 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: Xuefer at 21cn dot com
New email:
PHP Version: OS:


 [2003-08-05 23:01 UTC] Xuefer at 21cn dot com
accessing http://localhost/a.php (not exist file)
will cause apache2 to restart

Reproduce code:
step 1:
echo test > c:\404.php

Alias /404.php c:/404.php
ErrorDocument 404 /404.php

open browser to http://localhost/a.php
apache2 log:
[client] script not found or unable to stat
[Wed Aug 06 01:52:53 2003] [notice] Parent: child process exited with status 4294967295 -- Restarting.

open browser to http://localhost/a.html
apache2 log only have:
[client] script not found or unable to stat

step 2:
echo test > c:\404.html
changed config to:
Alias /404.html c:/404.html
ErrorDocument 404 /404.html

open browser to http://localhost/a.html
got "test"
no error in apache2 log


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-06 09:38 UTC]
And how is PHP configured? As CGI / module? If latter, which module?

 [2003-08-06 09:47 UTC] Xuefer at 21cn dot com
LoadModule php4_module C:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php .php3

php is working fine, only ErrorDocument do not work
 [2003-08-06 17:34 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 06:03:49 2022 UTC