Just ran into the following error:
Code: Select all
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1817779 bytes) in /home/ferry/mthk/trunk/src/include/MthkXML.php on line 180
[SOLUTION]
Although there was a known issue with php5-tidy regarding bad memory management (Debian bug tracking: #463872, 464074), it was simply bad programming in my case:
I had a hidden recursion that caused the generated XML to grow beyond reasonable size.
To figure that out, I just saved the to-be-parsed XML-string into a temporary file:
Code: Select all
file_put_contents('/tmp/xml-tidy-debug.xml', $xml_string);