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

SaxXmlParser::parseString() throws a PHPTAL_ParserException which isn't
catched by the try/catch block which leads directly to an apache
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,
What definitely helps is to explicitly catch PHPTAL_ParserException at
the end of the switch-block (like the TemplateException does).

A sample:


<span style="" style="">I kill the parser</span>


$template = new PHPTAL('test.xhtml');

Expected result:
PHPTAL Exception
Attribute style in < span > is defined more than once

Actual result:
Apache segmentation fault

Used environments:
1. Gentoo amd64, apache 2.22, php 5.3.11, eaccelerator
2. Gentoo amd64, apache 2.22, php 5.3.9, eaccelerator
3. Ubuntu x86, apache 2.22, php 5.3.6, eaccelerator

Maybe, someone has a clue. At least, this report may help anyone having
the same problem :)



PHPTAL mailing list

Reply via email to