Posted by Andy Hassall on 01/20/07 11:41
On 18 Jan 2007 06:32:14 -0800, bmichel@gmail.com wrote:
>What I'm doing is the following:
>- Load XML data a file
>- Parsing the XML data
>- Printing some parsed content
>
>The problem is that the script execution is stopping before all the
>content is parsed and printed.
>Maybe the PHP is out of memory after a while. That would make sense
>since the XML file is about 2 MB.
>
>Someone has any ideas how I can solve this problem?
(1) Raise the PHP memory_limit parameter and/or max_execution_time (as posted
by others), depending on what error you get (you didn't post an error).
(2) Change the script to use less memory, e.g. by using a stream-based parser
such as expat - see http://php.net/xml - instead of loading the entire file
into memory then parsing it.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|