On Mar 10, 4:05 pm, cartosys <[email protected]> wrote: > code: > > $link = 'http://some.xml.feed.xml'; > $parsed_xml = new XML($link); > $parsed_xml = Set::reverse($parsed_xml); > > The XML feed at hand is one that took over a minute to load via > browser. cakephp's XML returned an empty array after Set::reverse, > and always after ~30 seconds (timed with a timer).
Have you tried loading the same xml file locally? I'd give that a try as it might narrow down the problem. By locally, I mean from the filesystem, not through your local webserver. The idea being to check if it's ok without using HTTPSocket. > Which is where the parser time's out after 30 seconds. This can't be > fixed by raising any php.ini timout values which I set to 10 minutes. > > max_execution_time = 600 > max_input_time = 600 It's better to leave your global settings at something reasonable and do this in your app where you need it: set_time_limit(0); That removes the limit altogether for the duration (however long that may be :-) of the script. > So my only solution now is to break the rules and modify cake/lib/ > socket.php with the following line of code just above the above > mentioned fread line which works: > > stream_set_timeout ($this->connection, 600); > > ... > > If anybody knows of a better workaround (like setting > stream_set_timeout elsewhere in cake or php.ini), that would rock. > > xml parser cakephp ubuntu 9.10 I think you could just do that in your controller (or wherever this code is). Put it with the set_time_limit(0) I mentioned. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
