i’m tring to implement Smarty template on wordpress, and i have this problem:
PHP Fatal error: Uncaught –> Smarty: unable to write file
./templates_c/wrt531ad24297cbc2.21519452 <– n thrown in
/var/www/afric-edu/library/Smarty/sysplugins/smarty_internal_write_file.php
on line 44
I first thought about permission problem and i tried this:
chmod -R 777 /library/Smarty
but no results…
maybe this is related to a history of absolute and relative links ? Have you an idea ?
Thanks for your help
Assuming the root folder is
/var/www/html/
, The following SELinux commands will fix the issueYou are right(almost), this is permission problem.
You need to allow Smarty to write to directories where it stores compiled templates
./templates_c/
in your case.First check templates_c folder exists and the path of
$this->setCompileDir()
in your Smarty class. Then give to Smarty the permissions:chmod -R 777 templates_c