|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13455 Using include() with Apache ErrorDocument directive can crash the webserver
Submitted: 2001-09-26 12:37 UTC Modified: 2002-12-06 19:56 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: manitu at manitu dot net Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Any Linux with any Apache
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
49 - 46 = ?
Subscribe to this entry?

 [2001-09-26 12:37 UTC] manitu at manitu dot net

1. You must run Apache in any version on a Linux system and have setup an VirtualHost entry with
an example domain "".

2. Configure an .htaccess file like

    ErrorDocument 404

3. The notfound.html file MUST NOT exist and you MUST use an external path

4. Write a php script like



The include() function tries to get the specified document but cannot find it. So the Apache webserver
sends an 404 error together with a HTTP redirection. The include() tries to catch this address which
leads into an infinite loop. The webserver will die shortly.


The include() function should have a limit on how many levels it tries to catch since the webserver is not
able to determine if the caller runs into an infinite loop.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-14 14:10 UTC]
I understand what you've explained. But I'll set status to Suspended. Please work around this problem.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 25 06:03:33 2022 UTC