php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10834 PHP will crash if you execute a double-include, which go through 2 directories
Submitted: 2001-05-12 18:21 UTC Modified: 2001-06-01 10:32 UTC
From: info at home-page dot de Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.0.5 OS: Windows, Linux
Private report: No CVE-ID: None
 [2001-05-12 18:21 UTC] info at home-page dot de
To reproduce it, create a php file (content doesn't matter), then make a directory and change into it. Create a second php file including the first one, make another directory and write a php file with an include to the second file into it. When you start this file, PHP begins to consume all available CPU und RAM resources. The consequence is a crash of the whole machine running the httpd- or php-process. The memory limiting function in PHP doesn't take effect in this case.

Regards,

Daniel Fuehrer

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-12 19:36 UTC] derick@php.net
I could not reproduce this on Linux/PHP 4.0.6dev with the
following structure:

/include1.php
/1/include2.php
/2/test.php

test.php =
<?php
include ("../1/include2.php");
echo "test.php\n";
?>

include2.php =
<?php
include ("../include1.php");
echo "include2.php\n";
?>

include1.php =
<?php
echo "include1.php\n";
?>

Are you maybe doing a recursive include? Does using include_once (instead of include) works for you?
If these two options don't help you, please make a tar of your reproducing scripts, and mail them to me (derick at php dot net).
 [2001-06-01 10:32 UTC] sniper@php.net
No feedback. Most likely case of recursive include.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC