Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 3.1.14 Installation problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
holoduke
Smarty n00b


Joined: 03 Jul 2013
Posts: 3

PostPosted: Wed Jul 03, 2013 8:49 am    Post subject: Smarty 3.1.14 Installation problem Reply with quote

Hello,

I'm actually trying to install Smarty for the first time.
I'd like to test the demo template but I got this error message:

Code:
exception 'SmartyCompilerException' with message 'Syntax Error in template "template/default/templates/index.tpl"  on line 1 "{config_load file=\"test.conf\" section=\"setup\"}"  - Unexpected "\"' in /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatecompilerbase.php:667
Stack trace:
#0 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error()
#1 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templateparser.php(3209): Smarty_Internal_Templateparser->yy_syntax_error(10, '\')
#2 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(10, '\')
#3 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatecompilerbase.php(206): Smarty_Internal_SmartyTemplateCompiler->doCompile('{config_load fi...')
#4 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_template.php(187): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#5 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource()
#6 /home/www/smf.com/lib/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('index.tpl', NULL, NULL, NULL, true)
#7 /home/www/smf.com/app/BookingCoiffure.php(9): Smarty_Internal_TemplateBase->display('index.tpl')
#8 /home/www/smf.com/index.php(5): BookingCoiffure->main()
#9 {main}


I've tried with a simple "ok" in another .tpl file and it worked.
Looks like Smarty or PHP "magic quotes" the content before parsing it so
Code:
{config_load file="test.conf" section="setup"}

is crashing because interpreted as
Code:
{config_load file=\"test.conf\" section=\"setup\"}


Any idea?

Thanks! Very Happy
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Wed Jul 03, 2013 1:42 pm    Post subject: Reply with quote

turn off magic quotes?
Back to top
View user's profile Send private message Visit poster's website
holoduke
Smarty n00b


Joined: 03 Jul 2013
Posts: 3

PostPosted: Wed Jul 03, 2013 5:20 pm    Post subject: Reply with quote

I've just tried, it doesn't solved the problem Crying or Very sad
Back to top
View user's profile Send private message
holoduke
Smarty n00b


Joined: 03 Jul 2013
Posts: 3

PostPosted: Wed Jul 03, 2013 7:00 pm    Post subject: Reply with quote

My mistake!!

Just if someone get the same problem:
You can't disable magic_quotes by the ini_set function.

You should disable magic_quotes_runtime (and not magic_quotes_gpc) from virtualhost.

Thanks for the help!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup 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