From: bo at theaddedones dot com
Operating system: MAC OS X, AMD Altholon, SOLARIS
PHP version: 4.3.8
PHP Bug Type: DOM XML related
Bug description: massive memmory problem in domxml_open_mem
Description:
------------
I know this issue has been resolved in PHP 5.0 using DomDocument::loadXML,
BUT in non 5.0 versions, the loading of string XML (memmory) bits has some
serious garbage collection problems...namely repeated calls to
domxml_open_mem eats the memmory of the system alive....
unsetting variables has no effect....
Reproduce code:
---------------
$tt = '<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<ff>
<rrr>555</rrr>
<rrrr>5555</rrrr>
<rrrrr>55555</rrrrr>
<rrrrrr>555555</rrrrrr>
<rrrrrrr>5555555</rrrrrrr>
<rrrrrrrr>55555555</rrrrrrrr>
<rrrrrrrrr>555555555</rrrrrrrrr>
</ff>
</data>';
for($i=0;$i<100000;$i++){
$dd = domxml_open_mem($tt);
unset($dd);
}
Expected result:
----------------
not to have the system memory jump by Megabytes...if the loop is left for
longer it will eventually chew all resources
Actual result:
--------------
massive eating of memmory
--
Edit bug report at http://bugs.php.net/?id=29450&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29450&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29450&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29450&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29450&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29450&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29450&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29450&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29450&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29450&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29450&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29450&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29450&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29450&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29450&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29450&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29450&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29450&r=float