ID:               40184
 Updated by:       [EMAIL PROTECTED]
 Reported By:      florence at post dot harvard dot edu
-Status:           Open
+Status:           Feedback
 Bug Type:         SimpleXML related
 Operating System: Win XP
 PHP Version:      5.2.0
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2007-01-21 08:12:38] florence at post dot harvard dot edu

Description:
------------
Configure Command => cscript /nologo configure.js 
"--enable-snapshot-build" "--with-gd=shared"
Using php.ini-recommended
-----
I am trying to parse about 4,000 xml files (each about 100-900KB in
size). The script I am using simplexml_load_file(). I get an out of
memory error after about 800 files.

I found bug #38604 and ran the script from that report (I copied it
below) and quickly got the out of memory error.
Bug #38604 says "This bug has been fixed in CVS."  Was this really
fixed or was the bug report just closed? If it was really fixed, is the
fix in 5.2.0?

Reproduce code:
---------------
<?php
  $xml = '<root><node></node></root>';
  $xmldata = simplexml_load_string($xml);
  while (true) {
    $foo = $xmldata->node;
    foreach ($foo as $node)
    {
    }
  }
?>




Actual result:
--------------
G:\x>php test_bug38604.php
PHP Fatal error:  Out of memory (allocated 839122944) (tried to
allocate 2013265
92 bytes) in G:\x\test_bug38604.php on line 8


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40184&edit=1

Reply via email to