title: Smarty PHP Template Engine - file permission errors and missing templates
body: <p>I am having a lot of headaches with the Smarty PHP Template Engine - Version 2.6.0 (smarty.net)</p>
  
  <p>An error I keep getting in my error_log is </p>
  
  <blockquote>
    <p>PHP Fatal error:  Smarty error: unable to write to $compile_dir
    '/var/www/vhosts/domain/library/templates/compiled'. Be sure
    $compile_dir is writable by the web server user. in
    /var/www/vhosts/domain/library/Smarty-2.6.0/libs/Smarty.class.php on
    line 1088</p>
  </blockquote>
  
  <p>I have made the folder and files writable with permissions set to 777 but still this error keeps happening.</p>
  
  <p>It is making updating the template files a nightmare as currently I am updating the code in two places -> the templates folder and the compiled folder. It's like no compilation is happening so editing the already compiled file is the only way I can make a change to the site.</p>
  
  <p>However, I had a template file that was being included in another template file and this was not in the compiled directory. After making a simple text change in this file has now completely removed that section of the site and the page just breaks that section is supposed to appear.</p>
  
  <p>I am completely stumped with this and am hoping some of you with Smarty experience will be able to help me out.</p>
  
  <p>Thank you in advance.</p>