tags:

views:

145

answers:

3

hi when i open my site (made in smarty) i got this error plz resolve im very new in smarty

Smarty error: unable to read resource: "pagetemplate.tpl" in /var/www/vhosts/example.com/htdocs/includes/smarty/Smarty.class.php on line 1083

Warning: Smarty error: unable to read resource: "pagetemplate.tpl" in /var/www/vhosts/example.com/htdocs/includes/smarty/Smarty.class.php on line 1083

Thanks

+1  A: 

Did you set your template directory to where the template file is located?

$smarty->template_dir = ...
Zed
thanks a lot it is working now
vipinsahu
So give Zed credit for the answer. 31 questions and not a single selected answer nor upvote.
Mike B
A: 

There is a few things you might want to check:

  • Did you properly configure Smarty's initial settings as such?

CODE:

$smarty->template_dir = '/path/to/templates_dir';
$smarty->compile_dir = '/path/to/compile_dir';
$smarty->cache_dir = '/path/to/cache_dir';
  • Does pagetemplate.tpl exist within $smarty->template_dir?
Andrew Moore
what is the path of the file where i can change
vipinsahu
**@vipinsahu:** modify the file where you create your Smarty instance to set those path.
Andrew Moore
thanks a lot for such wonderful info
vipinsahu
+1  A: 

Hi,

Smarty did obviously not find the "pagetemplate.tpl" file.

Two ideas :

  • Does the file indeed exists ? (If your are under Linux, files names are case sensitive : "PageTemplate.tpl" and "pagetemplate.tpl" would not be the same file.
  • Is smarty's $template_dir correctly set ? Does it point to the right directoy ? (same thing about case-sensitivity, btw)
  • And a third : do you have read-access to that file / directory ?

While you're at it, you might also want to check the $compile_dir variable.

Pascal MARTIN
what is the path of the file where i can change
vipinsahu
very thanks 2 u
vipinsahu