|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-07-25 03:34 UTC] anthony dot debhian at only-for dot info
Description:
------------
The code crash apache.exe with php-5.0.0/apache-1.3.31 and php-4.3.3/apache-1.3.27 (2 pc, 2 config)
The GET request does not appear in access.log and error.log.
this bug's odd, perhaps not important, but i send you feedback anyway.
Reproduce code:
---------------
<?
function funcfunc($array,$space="")
{
foreach($array as $key=>$value) { if(is_array($array[$key])) { $src.=$key; } }
return $src;
}
function funcfunc2($array,$test)
{
foreach($array['test'] as $key=>$value) { }
return $array;
}
$test['lol']['test1']="test1";
$test['lol']['test2']="test2";
$array=funcfunc($test);
$array=funcfunc2($array,"test");
?>
Expected result:
----------------
Just a fatal error.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 13 12:00:01 2025 UTC |
i got the same obscure crash with php 5.0 + apache 2.0.48 on win98se with this code snippet: --------- <? $x=1; while($s2=$this->db_fetch_row($s)) { $x['birthday'].=$this->parse_tpl("k_links",$s2); } ?> -------- no errors, just apache crashI got the crach with PHP 4.3.7 + Apache 1.3.31 + Linux and PHP 4.3.4 + Apache 2.0.47 + Linux RH9. It didn't work with PHP 4.3.5 + Apache 1.3.29 + Win2K. A bit minimized version of this crash code: <?php function funcfunc($array){ foreach($array as $key=>$value) { $src.=$key; } return $src; } function funcfunc2($array){ foreach($array['foo'] as $key=>$value) { } } $a['x']['y']=""; $array=funcfunc($a); funcfunc2($array); ?><? function POC($var1) { while($var2 = POC($var1)) {} POC("test"); ?> PHP4 and PHP5 affected, recursion level limit. Tested on Latest stable versions and latest snapshots.