Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Help with error

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Patje1970
Smarty n00b


Joined: 19 Jul 2013
Posts: 1

PostPosted: Fri Jul 19, 2013 4:17 pm    Post subject: Help with error Reply with quote

Hi, I'm a newby with Smarty... I got a website of a friend of mine who has an error on the website... i looked at all the website templates but cannot find the error.
Can anyone maybe help me with the error as written down below?
Thank you in advance.

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "templates/block/tweet.tpl" on line 3 "{php}" unknown tag "php"' in /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php(253): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "ph...', 3) #1 /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templateparser.php(2322): Smarty_Internal_TemplateCompilerBase->compileTag('php', Array) #2 /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templateparser.php(2812): Smarty_Internal_Templateparser->yy_r36() #3 /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templateparser.php(2912): Smarty_Internal_Templateparser->yy_reduce(36) #4 /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_inte in /var/www/virtual/nietschieten.nl/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 431
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7267
Location: Lincoln Nebraska, USA

PostPosted: Fri Jul 19, 2013 6:51 pm    Post subject: Reply with quote

is $security enabled? if so, smarty will not allow {php} tags (by default)
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4636
Location: Hamburg / Germany

PostPosted: Fri Jul 19, 2013 6:52 pm    Post subject: Reply with quote

See http://www.smarty.net/docs/en/language.function.php.tpl

The {php} tag is depricated in Smarty 3 because it's bad praxis to put PHP code in templates and it could cause security porblems.

To enable it you must load SmartyBC.class.php and instance SmartyBC instead of Smarty.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7267
Location: Lincoln Nebraska, USA

PostPosted: Fri Jul 19, 2013 7:02 pm    Post subject: Reply with quote

Hmm there was no notice that an upgrade had occurred Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP