ID: 38604 User updated by: apachephp at gmail dot com Reported By: apachephp at gmail dot com -Status: Feedback +Status: Open Bug Type: SimpleXML related Operating System: Linux PHP Version: 5.1.5 New Comment:
is it OK if I upload my XML files somewhere ? Previous Comments: ------------------------------------------------------------------------ [2006-08-28 07:56:56] [EMAIL PROTECTED] Cannot reproduce. ------------------------------------------------------------------------ [2006-08-28 07:30:04] apachephp at gmail dot com the same problem with php5.2-200608280630 ------------------------------------------------------------------------ [2006-08-28 06:16:35] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [2006-08-26 06:51:00] apachephp at gmail dot com Description: ------------ I'm processing big XML file (1-10MB each) in loop. Very soon free memory is near to zero and system starts swapping. Reproduce code: --------------- <? function ProcessFile($filename) { if (file_exists($filename)) { $xml = simplexml_load_string(file_get_contents($filename)); foreach ($xml->report as $reports) { //echo $reports->forumid."\n"; } // var_dump($xml); unset($xml); } else { exit('Failed to open test.xml.'); } } $files=file('files.txt'); foreach ($files as $file) { $file=chop($file); echo "Processing $file\n"; ProcessFile($file); } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38604&edit=1