Jump to content

Smarty / PHP Problems! Please help


idv

Recommended Posts

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

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

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.