Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z Smarty.
Ad4m1992
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 1
Dołączył: 3.03.2007

Ostrzeżenie: (20%)
X----


Witam. Postanowiłem pouczyć się technologii Smarty jednak już na początku, tak jak zawsze zresztą, wystąpił problem.
  1. <?php
  2. 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
  3. ?>



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:
  1. <?php
  2. require('smarty/Smarty.class.php');
  3.  
  4. $smarty = new Smarty;
  5.  
  6. $smarty->template_dir ='templates/';
  7. $smarty->compile_dir ='templates_c/';
  8. $smarty->config_dir = 'configs/';
  9. $smarty->cache_dir = 'cache/';
  10.  
  11. ?>


Index.php:
  1. <?php
  2.  
  3. // put full path to Smarty.class.php
  4. require_once('smarty.inc.php');
  5. $smarty = new Smarty();
  6.  
  7. $smarty->assign('name', 'Ned');
  8. $smarty->display('index.tpl');
  9.  
  10. ?>


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

Ten post edytował Ad4m1992 23.01.2009, 21:13:34
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 15:33