|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-14 14:10 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 18:00:01 2025 UTC |
HOW TO REPRODUCE 1. You must run Apache in any version on a Linux system and have setup an VirtualHost entry with an example domain "www.domain.com". 2. Configure an .htaccess file like ErrorDocument 404 http://www.domain.com/notfound.html 3. The notfound.html file MUST NOT exist and you MUST use an external path 4. Write a php script like <?php include("http://www.domain.com/any_file_that_does_not_exist.html"); ?> WHAT HAPPENS 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. HOW TO SOLVE 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.