Szukałem na wielu forach jednak nic mi nie pomogło zbytnio.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
Drzewo moich katalogów przedstawia się pokrótce tak:
projekt:
Smarty.inc.php wygląda następująco:cache;
configs;
templates:
index.tpl;
templates_c;
smarty:
[cała zawartość smarty, Smarty.class.php itp];
index.php;
smarty.inc.php;
Index.php:<?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/';
?>
I nie wiem dlaczego pojawia się taki błąd. Próbowałem zmieniać już ścieżki na wszelakie sposoby stosując '../' "./" itp.<?php
// put full path to Smarty.class.php
require_once('smarty.inc.php');
$smarty = new Smarty();
$smarty->assign('name', 'Ned');
$smarty->display('index.tpl');
?>
Templates_c zmieniłem na chmod775 i cache tak samo.