Jump to content

Localhost "Fatal error: Uncaught --> Smarty: unable to write file"


Recommended Posts

Having this issue lately on the front end when loading a new page and in back office when saving an update.  The error is below:
 
Fatal error: Uncaught --> Smarty: unable to write file C:\xampp\[/size](website-dir)[/size]/cache/smarty/compile\33\27\3b\33273b26f582ca1d5dc706904f6852f5c14e62ad.file.errors.tpl.php <-- thrown in[/size]C:\xampp\(website-dir)\tools\smarty\sysplugins\smarty_internal_write_file.php on line [/size]74
 

Normally I would assume this is just a permission issue but I am building the site locally using XAMPP so I'm not sure why smarty is having trouble writing to the template files. If I refresh the page it will load fine, so it's not a perminant issue but very annoying when it occurs probably 1/3 page loads.

 

Haven't been able to find anyone having the same issue through Google searches. Anyone have an idea what might be causing it?

 

Running Windows 7 with XAMPP

Link to comment
Share on other sites

Definitely odd on localhost. Here are the possible causes:

        if (Smarty::$_IS_WINDOWS) {
            // remove original file
            @unlink($_filepath);
            // rename tmp file
            $success = @rename($_tmp_file, $_filepath);
        } else {
            // rename tmp file
            $success = @rename($_tmp_file, $_filepath);
            if (!$success) {
                // remove original file
                @unlink($_filepath);
                // rename tmp file
                $success = @rename($_tmp_file, $_filepath);
            }
        }

So basically it seems the rename fails for some  reason. You might try troubleshooting that file mentioned in the error, but it will probably take A LOT :(

Link to comment
Share on other sites

Well each time I get the error its a different compiled file name, which makes me think its taking issue with the directory itself? 

 

I've given the whole site full windows permissions for every user type (admin, user etc..) but it still occurs.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
×
×
  • Create New...