Latte – Kill server with my latte template
- nanuqcz
- Member | 822
Hello,
there is some bug in Latte parser that kills Apache. If I try to run this latte
template: http://pastebin.com/hMuc0hC1, server dies and returns nothing
to the browser (http://goo.gl/GUpaXb). Tested on local XAMPP with PHP 5.3.8
(phpinfo) and Nette
v2.2.0.
Here is this bug simulated on Nette sandbox: http://uloz.to/…atte-bug-zip.
Funny is that if I retype any part of this latte template (delete HTML comment, change some variable name), Latte starts working and show me the proper error message.
Thanks for replies.
P.S. In this latte template there is parse error (on 6. and 7. line
'}'
is missing). I know it. But Latte should throw some exception,
not kill the server.
- petr.pavel
- Member | 535
Unclosed tag:
else}{$c[‘min_s’]{/if}">
When my Indian shuts down, unclosed tags are always the first thing I search for :-)
edit: I forgot this was English forum. Sorry.
Last edited by petr.pavel (2014-05-23 10:47)
- nanuqcz
- Member | 822
petr.pavel wrote:
Neuzavřený tag:
else}{$c[‘min_s’]{/if}">
I know it, but in this case I expect some error message, exception etc. Not server kill :-)
petr.pavel wrote:
Sometimes, when latte is too complicated, PCRE kill the apache.
Try: https://forum.nette.org/…ows-riesenie
Yes, it looks like this is it. So, it is propably not a Nette bug. I am going to test that solution and let you know.