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

Error in template: unknown tag "private_print_expressio

 
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 -> General
View previous topic :: View next topic  
Author Message
Miguelso29
Smarty n00b


Joined: 20 Feb 2014
Posts: 1

PostPosted: Thu Feb 20, 2014 4:52 pm    Post subject: Error in template: unknown tag "private_print_expressio Reply with quote

Hello everyone!

First of all, thanks a lot in advance for your help! Even if you can´t help me.

I´m starting this thread because I´ve been searching for a solution (googling) for a lot of hours without success.

I´m installing a very basic application with smarty, just copied the libs to my project, created a template and an index.php with the next code:

Code:
<?php

define('SMARTY_DIR', '/libs/');
require(SMARTY_DIR . 'Smarty.class.php');

$smarty = new Smarty;

$smarty->template_dir = $_SERVER['DOCUMENT_ROOT'] . '/libs/templates/';
$smarty->compile_dir = $_SERVER['DOCUMENT_ROOT'] . '/libs/templates_c/';
$smarty->config_dir = $_SERVER['DOCUMENT_ROOT'] . '/libs/configs/';
$smarty->cache_dir = $_SERVER['DOCUMENT_ROOT'] . '/libs/cache/';

$smarty->assign('name','Ned');

$smarty->display('index.tpl');

?>


The error:

Quote:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "D:\Dropbox\web\proyectos\Monique\site\libs\templates\index.tpl" on line 3 "Hello, {$name}!" unknown tag "private_print_expression" <-- thrown in D:\Dropbox\web\proyectos\Monique\site\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 3


Someone else has got the same problem?

Again, thanks in advance.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Thu Feb 20, 2014 7:14 pm    Post subject: Reply with quote

By the error message it looks like that you did install Smarty below the document root.

Your define of SMARTY_DIR says something different
define('SMARTY_DIR', '/libs/');

Or is it just a typo in your post?
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 -> General 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