Results 1 to 2 of 2
Hi every one,
Fatal error: Smarty error: unable to write to $compile_dir '/var/www/smarty/templates_c'. Be sure $compile_dir is writable by the web server user. in /usr/local/lib/php/Smarty/Smarty.class.php on line 1095
I am ...
- 07-08-2007 #1Just Joined!
- Join Date
- May 2006
- Posts
- 5
Error running PHP
Hi every one,
Fatal error: Smarty error: unable to write to $compile_dir '/var/www/smarty/templates_c'. Be sure $compile_dir is writable by the web server user. in /usr/local/lib/php/Smarty/Smarty.class.php on line 1095
I am getting above error. I am running a php file with template engine. My apache is run by root and all the folders are accessable by root.
Please let me know what is the solution for it.
Regards,
Swaroop Kunduru.
- 07-11-2007 #2
Though you start apache as root, it will probably spawn a few child processes which ACTUALLY handle the requests, which will run as user apache or similar. What you will need to do is make the folders writable to that user. Personally i tend to make them read/write/execute to all users (though this is not particularly pretty, so you may want to check the user and make it better)
To test this, you could try setting the permissions to 777 on the folder(s) in question, and try loading it, i am fairly certain that this will be the situation.
Personally i wouldn't recomend leaving the folders at 777 however, just use it to try out wether it works or not, then maybe play around with chown on the folders (recursively of course)"I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327


Reply With Quote