| Tobias Daur 2005-02-22, 4:02 pm |
| Hi,
I'm stuck - hope, someone can help me.
I use smarty now for several projects on several servers, it's working
fine everywhere. Since upgrading my dev laptop to debian sarge (which
means: changing php to 4.3.10, apache to 1.3.3), Smarty doesn't find the
templates anymore.
Smarty: 2.6.6
I went down to this peace of code:
<?php
require('libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = '/var/www/smartytest/templates';
$smarty->debugging = true;
$smarty->debug_tpl = 'debug.tpl';
$smarty->display('index.tpl');
?>
I get:
Warning: Smarty error: unable to read resource: "index.tpl"
in /var/www/smartytest/libs/Smarty.class.php on line 1088
The dir and filename is correct, rights are correct, php safe_mode is
off.
It however works with
$smarty->display("/var/www/smartytest/templates/index.tpl");
and also with
$smarty->display($smarty->template_dir."/index.tpl");
Why doesn't it work here with
$smarty->display('index.tpl');
but works on every other server i tried with this sample?
thanks
Tobias
|