1 May 2012 10:36
PHP segfaults due Exception in SaxXmlParser
Hi list After upgrading TAL to 1.2.2, I found a little problem which makes TAL quite unuseable in scenarios, when you are not able to control the given xhtml source. Maybe, the problem depends on newer php versions and/or eaccelerator. SaxXmlParser::parseString() throws a PHPTAL_ParserException which isn't catched by the try/catch block which leads directly to an apache segfault. The only exception which gets catched is the PHPTAL_TemplateException. The ParserException subclasses the TemplateException but - however - php doesn't care about it. This happens every time when I access the script BUT not the first time. Setting forceReparse to true also 'fixes' the problem so I assume, the problem is somewhere between the phptal cache files and the exceptions in php. Maybe, the eaccelerator is involved, too. What definitely helps is to explicitly catch PHPTAL_ParserException at the end of the switch-block (like the TemplateException does). A sample: test.xhtml: <html> <body> <span style="" style="">I kill the parser</span> </body> </html>(Continue reading)


RSS Feed