php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16113 Circulaire includes makes Apache hang.
Submitted: 2002-03-16 12:35 UTC Modified: 2002-08-13 10:22 UTC
Votes:7
Avg. Score:4.4 ± 1.4
Reproduced:5 of 6 (83.3%)
Same Version:4 (80.0%)
Same OS:5 (100.0%)
From: tozz at embrace dot selwerd dot nl Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.1.2 OS: Any? (Mine: Linux 2.4.13)
Private report: No CVE-ID: None
 [2002-03-16 12:35 UTC] tozz at embrace dot selwerd dot nl
Hello,

Althought its the user responsibility to verify his scripts, my user did not have enough knowledge of PHP to be able to verify all his scripts and my Apache died.

The problem?
In short, i reproduced the problem by making 2 files:

file1.php:
<? include("http://host.name/file2.php"); ?>

file2.php
<? include("http://host.name/file1.php"); ?>

When you open http://host.name/file1.php you will see an enormous amount of Apache childs. And apache hangs (it does not respond to new requests!).

I know its the user his fault, but when you have a very complicated website this might happen because of bugs in your scripts. Because of this my Apache webserver died and I had to restart Apache to make it work again.  Perhaps its a good idea to add somekind of check to prevent things like this?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-17 14:46 UTC] tozz at embrace dot selwerd dot nl
And this issue can also be abused by users that want to DoS webservers.
 [2002-08-13 10:22 UTC] iliaa@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

Just like any other programming/scripiting language, PHP can be used to cause trouble.
To avoid this kind of problems use include_once or require_once.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 30 08:00:03 2025 UTC