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 Quote 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 Quote 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? Quote 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 Quote 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! Quote 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' ? ?? Quote 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 :'( Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.