Re: [Config] XML Parsing Serious Issues

From: Date: Fri, 19 Dec 2003 12:51:55 +0000
Subject: Re: [Config] XML Parsing Serious Issues
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9713@lists.php.net to get a copy of this message
<ts@siteartwork.de> 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. While I thank you for the trust you put in Config, as the package name implies, its purpose is to parse configuration files. Usually, configuration files are not 10Mb large. "If the only tool you have is a hammer, all your problems look like nails". I would recommend you to use a more appropriate solution to parse your 10Mb XML file... Config adds some overhead in order to make accessing the directives and sections more easily. You could give XML_Tree a try maybe. > 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". This doesn't surprise me. > 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). Line 152/153 of Config.php are comments, so your error message doesn't really help... > Anyway, I assume that there is a general problem with parsing huge XML-Files > (recursion?) in PHP, isn't there? Good guess. > Or is there a chance that using another PEAR-Class (XML_Tree?) may be better > for parsing huge XML-Files? It's always a good idea to try these things by yourself. > Any ideas, any experience made with parsing huige XML-Files? No. Bertrand Mansion Mamasam

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