Bug #15292 Updated: include() causes maxclients in apache.
| From: | morbid at bloodheart dot com | Date: | Wed, 30 Jan 2002 08:15:50 +0000 |
| Subject: | Bug #15292 Updated: include() causes maxclients in apache. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78516@lists.php.net to get a copy of this message | ||
ID: 15292
Comment by: morbid@bloodheart.com
Reported By: morbid@bloodheart.com
Status: Bogus
Bug Type: Apache related
Operating System: RedHat 7.1
PHP Version: 4.1.1
New Comment:
Ok, so if someone is running a site (For users) the users could do this
and cause sites to go down with just a few lines of code?
adding include_once; didn't work unless it occompanied by return;
eg...
//test (This is where the bug starts.)
default:
$file="$loca/bug2.php";
return;
}
include_once($file);
There should be some sort of limit on this? Unless there is and I don't
know of it. if there is I'm sorry. I have searched for something like
this and haven't come across anything.
Jason
Previous Comments:
------------------------------------------------------------------------
[2002-01-30 02:41:58] derick@php.net
User include_once to prevent this... not a bug > bogus.
Derick
------------------------------------------------------------------------
[2002-01-30 02:32:43] morbid@bloodheart.com
Ok, so there is no way to really stop this? Just let it continue
forever? (Until you restart apache?)
Cause yes that is basicly it, it just includes the file over and over.
------------------------------------------------------------------------
[2002-01-30 02:18:00] swm@php.net
Status should have been feedback.
------------------------------------------------------------------------
[2002-01-30 02:10:12] swm@php.net
Correct me I am wrong, but you seem to be saying that your
script includes a file via HTTP which is either itself or
another file which includes itself or the original (I cannot
tell from your description). But yes, if a script needs to
include itself than that will create an infinite loop.
There is no way that the scripting engine could preemptively
terminate this loop when HTTP based includes are being used.
Reopen if I have mis-understood.
------------------------------------------------------------------------
[2002-01-30 01:59:42] morbid@bloodheart.com
<?
$loca="http://www.bloodheart.com/php";
switch ($id)
{
//test1
case blank1:
$file="$loca/blank1";
break;
//test2
case blank2:
$file="$loca/blank2";
break;
//test (This is where the bug starts.)
// Note if you copy this file to another file and set the default as
thatfilename (with .php ext)
// Then spawns maxclients for apache, and stays that way forever,
a very nasy loop. or until you restart apache
// *Example*
// default:
// $file="$loca/bug2.php";
default:
$file="$loca/blank3";
break;
}
?>
--CONFIGLINE
./configure --with-mysql=/usr/local/mysql \
--enable-track-vars \
--with-apache=../apache_1.3.22 \
--with-mm=../mm-1.1.3 \
--with-openssl=../openssl-0.9.6c \
--with-config-file-path=/usr/local/lib/php
I don't recall this happening with an earlier version of php.
This just started with 4.1.1
If you need anymore information please let me know
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=15292&edit=1