<?php Fatal error: Smarty error: unable to write to $compile_dir '/home/ad4m/public_html/projekt/templates_c'. Be sure $compile_dir is writable by the web server user. in /home/ad4m/public_html/projekt/smarty/Smarty.class.php on line 1092 ?>
Szukałem na wielu forach jednak nic mi nie pomogło zbytnio.
Drzewo moich katalogów przedstawia się pokrótce tak:
projekt:
cache;
configs;
templates:
index.tpl;
templates_c;
smarty:
[cała zawartość smarty, Smarty.class.php itp];
index.php;
smarty.inc.php;
Smarty.inc.php wygląda następująco:
<?php require('smarty/Smarty.class.php'); $smarty = new Smarty; $smarty->template_dir ='templates/'; $smarty->compile_dir ='templates_c/'; $smarty->config_dir = 'configs/'; $smarty->cache_dir = 'cache/'; ?>
Index.php:
<?php // put full path to Smarty.class.php require_once('smarty.inc.php'); $smarty = new Smarty(); $smarty->assign('name', 'Ned'); $smarty->display('index.tpl'); ?>
I nie wiem dlaczego pojawia się taki błąd. Próbowałem zmieniać już ścieżki na wszelakie sposoby stosując '../' "./" itp.
Templates_c zmieniłem na chmod775 i cache tak samo. Posiadam linuxa Debian Etch