|
Posted by CK on 05/25/07 14:48
Christoph Burschka wrote:
> CK schrieb:
>> 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
>>
>> CK
>
> The parsing process likely requires more memory than just the size of
> the file. I've had similar problems when reading or processing other
> files that were significantly above half the memory limit.
>
> You could try to optimize the memory usage - perhaps split the file up
> in chunks in temp files and process them one at a time, rather than read
> the entire file into memory. Not all XML files can be split like this,
> but those that have a long list of identical entities in series (say, an
> RSS feed with hundreds of items) can be. You'd just need to add the
> opening and closing tags to each chunk.
>
> --
> cb
Thanks for your input . But my XML file can not be split .
Navigation:
[Reply to this message]
|