Latte – Kill server with my latte template

Notice: This thread is very old.
nanuqcz
Member | 822
+
0
-

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.

Jan Tvrdík
Nette guru | 2595
+
0
-

try running the compiled template directly

nanuqcz
Member | 822
+
0
-

The compiled template (latte-bug-app-templates-Homepage-default-latte-da363cc2c27b4d6a62d975f23b8a880e.php) is empty (0 byte size).

David Grudl
Nette Core | 8136
+
0
-

5.3.8 z CLI na windows bez problému…

petr.pavel
Member | 535
+
0
-

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)

matopeto
Member | 395
+
0
-

Sometimes, when latte is too complicated, PCRE kill the apache.

Try: https://forum.nette.org/…ows-riesenie

nanuqcz
Member | 822
+
0
-

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.

nanuqcz
Member | 822
+
0
-

Ok, I tried that and it helps, the latte template now works fine (show visible error as expected).

So, this is not Nette bug.

Thanks for your help :-)