Smarty complains about permissions. I wrote a small mvc framework for a project that I am working on, and I need to be able to display patterns in each controller. I went ahead and followed Smarty installation instructions and set all the configuration parameters in my βfront controllerβ or page that directs requests to the rest of the application. The testinstall function says that everything is kosher, but when I try to display patterns in my controllers, I get this.
Warning: mkdir (): permission denied in / var / www / HRTRL / includes / CallLog / lib / Smarty / libs / sysplugins / smarty _internal_write_file.php on line 28 Warning: renaming (/TMP/wrt6piczo,/templates_c/73b1662b4c376f493243f34934ffb34f9f9f9f9 .poopy.tpl.php.): there is no such file or directory in / var / www / HRTRL / includes / CallLog / lib / Smarty / libs / sysplugins / smarty _internal_write_file.php on line 48 Warning: chmod (): There are no such files or directory in / var / www / HRTRL / includes / CallLog / lib / Smarty / libs / sysplugins / smarty _internal_write_file.php on line 50 Warning: include (./templates_c/73b1662b4c376f493278f9873564df03430a0b43.file.poopy.plopy.plopy Could not open stream: there is no such file or in the directory / var / www / HRTRL / includes / CallLog / lib / Smarty / libs / sysplugins / smar ty _internal_template.php on line 423 Warning: include (): Failed opening './templates_c/73b1662b4c376f493278f9873564df03430a0b43.file.poopy.tpl.php' to enable (Include_path = ': / USR / share / PHP: / USR / share / pear ') in / var / www / HRTRL / includes / CallLog / lib / Smarty / libs / sysplugins / smarty _internal_template.php on line 423
I tested the rest of my framework independently and everything seems to work. My front controller correctly directs the right controllers, and I seem to be able to render plain HTML just fine.
In addition, I used chmodded all the Smarty library folders, as well as other necessary directories for 777 for testing only. I am still getting the same permission errors.
EDIT
These are the settings that I used for all of the required smarty folders.
$smarty->setTemplateDir('lib/smarty/templates'); $smarty->setCompileDir('lib/smarty/templates_c'); $smarty->setCacheDir('lib/smarty/cache'); $smarty->setConfigDir('lib/smarty/configs');
php templates smarty
Josh infiesto
source share