| 
	
 | 
 Posted by Roy Kaldung on 05/25/07 07:43 
CK wrote: 
> Hello Folks, 
> My environment is : FreeBSD 6 , apache 1.3.7 and PHP5  
> I want to parse a big XML file (39MB) . In my php.ini I set memory_limit to 
> 64M but I still have a error message followed : 
> Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to 
> allocate 57 bytes) ... 
>  
> Your helps would be appreciated . 
> Thanks 
 
Hi, 
 
try to parse your XML with an SAX Parser 
instead a DOM parser (-> )if possible. A Dom parser builds a complete  
tree of the XML file in memory, a SAX parser is 'event driven'. For  
event driven parsing see http://www.php.net/manual/en/ref.xml.php 
 
hth, 
Roy
 
  
Navigation:
[Reply to this message] 
 |