Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Fatal error: Smarty error: unable to write to $compile_dir

 
Post new topic   Reply to topic    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
hipekhop
Smarty n00b


Joined: 21 Oct 2010
Posts: 3

PostPosted: Thu Oct 21, 2010 1:44 pm    Post subject: Fatal error: Smarty error: unable to write to $compile_dir Reply with quote

Hi.
On the begin- I'm searching, I'm trying... but i have still this:
Fatal error: Smarty error: unable to write to $compile_dir '/var/www/html/templates_c'. Be sure $compile_dir is writable by the web server user. in /var/www/html/Smarty/Smarty.class.php on line 1092

Plise, talk to me as to man, who can't speak english... as you see, I'm not good in this language Wink

Thanks Smile
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7361
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 21, 2010 1:53 pm    Post subject: Reply with quote

make sure /var/www/html/templates_c is writable by the user apache is running as. If you don't care how open it is:

Code:
chmod 777 /var/www/html/templates_c


would do it, any user can write then.
Back to top
View user's profile Send private message Visit poster's website
hipekhop
Smarty n00b


Joined: 21 Oct 2010
Posts: 3

PostPosted: Thu Oct 21, 2010 11:31 pm    Post subject: Reply with quote

Still :/

[root@Rolnik Hilary]# ls -l /var/www/html
razem 184
drwxrwxrwx. 2 Hilary Hilary 4096 06-03 18:14 cache
drwxrwxrwx. 2 Hilary Hilary 4096 06-03 18:14 configs
-rwxrwxrwx. 1 Hilary Hilary 1467 10-21 03:05 %%F7^F7F^F7F34188%%header.tpl.php
drwxrwxrwx. 7 Hilary Hilary 4096 10-21 02:52 includes
-rwxrwxrwx. 1 Hilary Hilary 183 10-21 03:39 index.php
drwxrwxrwx. 4 Hilary Hilary 4096 06-03 18:23 languages
drwxrwxrwx. 17 Hilary Hilary 4096 10-21 02:44 old
drwxrwxrwx. 2 Hilary Hilary 4096 06-03 18:12 picture_library
drwxrwxrwx. 2 Hilary Hilary 4096 06-03 18:12 plesk-stat
drwxrwxrwx. 2 Hilary Hilary 4096 06-03 18:12 pliki
drwxrwxrwx. 4 Hilary Hilary 4096 06-03 18:23 Smarty
-rwxrwxrwx. 1 Hilary Hilary 128961 10-21 15:36 Smarty-3.0rc4.tar.gz
-rwxrwxrwx. 1 Hilary Hilary 136 10-21 02:50 szablon_techniczne.php
drwxrwxrwx. 2 Hilary Hilary 4096 10-21 03:04 templates
drwxrwxrwx. 2 Hilary Hilary 4096 10-21 03:06 templates_c

chown Hilary /var/www/ -R I'm trying too... nothing :/
Back to top
View user's profile Send private message
jguerra
Smarty Rookie


Joined: 15 Mar 2017
Posts: 6

PostPosted: Mon Mar 20, 2017 3:57 pm    Post subject: Smarty error: unable to write to $compile_dir Reply with quote

Did you ever get this resolved? Since it's 6 1/2 years old I imagine so, but there's no solution posted.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1024

PostPosted: Mon Mar 20, 2017 4:13 pm    Post subject: Reply with quote

The resolution is quite simple and not relevant to Smarty.
One way or another, but writing to compile directory is blocked.
You have to resolve it on your end, either by providing a writable compile_dir, or configure your PHP and filesystem to allow writing to an already configured one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP