idv Posted January 28, 2009 Share Posted January 28, 2009 Hi Using the editor in Plesk I have just made a simple text change i.e. 'Hi' to 'Hello' in the header.tpl.htm template. The site is using PHP/Smarty and I am now getting the error when viewing the page/site in the browser. Before I made a change to the header.tpl.htm file the website was workin.g fine. I even uploaded the previous version of the header.tpl.htm file but I am still getting this new error Smarty error: unable to write to $compile_dir '/var/www/vhosts/ourdomain.com/subdomains/beta/httpdocs/_templates_c'. Be sure $compile_dir is writable by the web server user How do I get around this problem? This is on our new server, so could it be a server setting? TIA Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/ Share on other sites More sharing options...
flyhoney Posted January 28, 2009 Share Posted January 28, 2009 Looks like the permissions on the _templates_c folder changed somehow. You need to make it writable. If you have ssh access, you can do this from the command line: chmod 0777 /var/www/vhosts/ourdomain.com/subdomains/beta/httpdocs/_templates_c Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-749043 Share on other sites More sharing options...
idv Posted January 29, 2009 Author Share Posted January 29, 2009 Hi Thanks So in Plesk I just need to go into 'Domains' > ourdomain.com > SSH Terminal Then when it loads just paste in the following chmod 0777 /var/www/vhosts/ourdomain.com/subdomains/beta/httpdocs/_templates_c to get rid of the error below? Smarty error: unable to write to $compile_dir '/var/www/vhosts/ourdomain.com/subdomains/beta/httpdocs/_templates_c'. Be sure $compile_dir is writable by the web server user Also could the above be done through my FTP client? Also how do I check permissions on the _error dir on the server, as this needs to be writable? Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-749884 Share on other sites More sharing options...
gevans Posted January 29, 2009 Share Posted January 29, 2009 In your ftp client you can right-clock on a directory and hit an option such as 'Properties/CHMOD'. That should let you see and change the directories permissions Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-749887 Share on other sites More sharing options...
idv Posted January 29, 2009 Author Share Posted January 29, 2009 When running the CHMOD command the error goes, but the site then does not load the CSS files and images used in the site? Any ideas, I'm stumped! Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-749958 Share on other sites More sharing options...
idv Posted January 29, 2009 Author Share Posted January 29, 2009 Also when looking at the templates_c directory in plesk Most of the files have under 'user' and 'group' ourusername psacln However one file %%97^97B^97B39B8E%%g-header.tpl.htm.php has apache and apache under 'user' and 'group' ? ?? Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-749982 Share on other sites More sharing options...
idv Posted January 29, 2009 Author Share Posted January 29, 2009 anybody have any idea with this? as I am trying to get the site back up and running :'( Link to comment https://forums.phpfreaks.com/topic/142876-smarty-php-problems-please-help/#findComment-750110 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.