|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-17 00:20 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 21:00:02 2025 UTC |
Description: ------------ When looping numerically through an associative array, certain operations cause a massive memory leak in Apache, eating up all available ram at about 60mb/s. Windows grinds to a halt as 1gb of Virtual Memory is gobbled up. Trying to echo each element of the array returns nothing as would be expected, but concatting or executing a function such a stripslashes on the elements causes the memory leak. My php.ini differs only in max_execution time and the maximum size of POST uploads. Reproduce code: --------------- $array['a'] = 'Some text'; $array['b'] = "It\'s nice text"; // prints 2 echo count($array); // prints nothing echo $array[0]; // does nothing $array[0] = stripslashes($array[0]); for ($i=0; $i<count($array); $i++) { // does nothing echo $array[$i]; // memory leak $array[$i] = 'blah' . $array[$i]; // memory leak $array[$i] = stripslashes($array[$i]); } Expected result: ---------------- To have no effect on the array Actual result: -------------- Sorry, I can't decipher your instructions for using backtrace! Shoot the stupid guy ;o)