Re: [Config] XML Parsing Serious Issues

From: Date: Fri, 19 Dec 2003 11:11:32 +0000
Subject: Re: [Config] XML Parsing Serious Issues
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9708@lists.php.net to get a copy of this message
This doesn't sound like a limitation of PHP, but rather a bug in Config. In general, if you're going to be doing resource-intensive parsing of XML, and you want to do it in PHP, I would tend to recommend using the DOM or SAX PHP functions directly. Thomas On Fri, 2003-12-19 at 02:57, Thorsten Suckow-Homberg wrote: > Hello List, > > once again, I ran into some serious problems using the Config-Package for > parsing XML-Files. > > We are running a webserver with a system seup as follows: > > Pentium 1GhZ, 1GB RAM, Suse 7.3, PHP 4.3.4 > Php.ini: > memory_limit(1GB) > max_execution_tim(10000) > etc. etc. > > We have to parse huge XML-Files and I decided to use the Config (latest > release). > > Here's what happens: > > We load a 10 MB big XML-File into the Root-Object (parseConfig('Yadayada', > 'XML')), which takes a while. > Using "top" under the console we can see that the http-process uses up to > 180MB memory - then the process quits with the result that I get either > error-output in the browser (see below) or a message "page cannot be > displayed". > > Errors are kind of "cannot use a scalar value in Config.php line 152+153" > and sometimes it tells me "overloading of a string not allowed" (have to > testrun it again to get the exact error-message). > > Anyway, I assume that there is a general problem with parsing huge XML-Files > (recursion?) in PHP, isn't there? > > Or is there a chance that using another PEAR-Class (XML_Tree?) may be better > for parsing huge XML-Files? > > Any ideas, any experience made with parsing huige XML-Files? > > TIA > > Thorsten -- Thomas Johnson thomas@unifiedconsulting.com Unified Consulting: Internet Strategy & Software www.unifiedconsulting.com

« previous php.pear.general (#9708) next »