Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.