[TYPO3-dev] EM problems

Dimitri Tarassenko mitka at mitka.us
Wed Apr 5 22:28:12 CEST 2006


Did some more debugging on 1and1 problems with the new EM. Longer and
sadder story follows:

To get the memory issues out of the way, php.ini file was placed in
/typo3/mod/tools/em where memory limit was set to -1 (off).

1. Initially, the problem was traced to

$content .= $this->xmlhandler->parseExtensionsXML(implode(gzfile(PATH_site.'typo3temp/extensions.xml.gz')));

in /typo3/mod/tools/em/class.em_index.php, in particular, the gzfile()
call. Apparently, this call causes a segfault in PHP. What's
interesting, is that when executed from a test php file on the same
gzipped extensions.xml.gz like this:

<?php
$a = implode(gzfile('extensions.xml.gz'));
print_r($a);
?>

everything works just fine.

Ok, I never liked the idea of doing an implode(gzfile()) on a 5M file
anyway. I've replaced the part in class.em_index.php that calls
gzfile() with a code that retrieves the uncompressed extensions
metadata XML via gzopen()/gzread().

This got me a bit farther, into the XML parser (class.em_xmlhandler)
where I hit the final blocker - xml_parse() in parseExtensionsXML()
methods fails, returning "out of memory" error in line 1. Out of
curiousity, I appended get_memory_usage() to the error message there
and it shows that only about 17M of memory is used at this point.

Now that's a reall show stopper so far.

Any ideas?

--
Dimitri Tarassenko


More information about the TYPO3-dev mailing list