Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> 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


--------------------
Tasi.pl - wejdź i zostań z nami na dłużej
Artykuły, aktualności, filmiki, foto - wszystko z lekkim przymrużeniem oka


Zwiększ ilość odsłon na swoim stronie
Go to the top of the page
+Quote Post
baranek77
post
Post #2





Grupa: Zarejestrowani
Postów: 66
Pomógł: 7
Dołączył: 17.12.2007

Ostrzeżenie: (0%)
-----


po errorze wydaje się ,że chmod 777 template_c powinno pomóc
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 21.08.2025 - 10:01