bulla101 Posted March 14, 2015 Share Posted March 14, 2015 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 More sharing options...
NemoPS Posted March 14, 2015 Share Posted March 14, 2015 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 More sharing options...
bulla101 Posted March 14, 2015 Author Share Posted March 14, 2015 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 More sharing options...
NemoPS Posted March 16, 2015 Share Posted March 16, 2015 Oh, so it's not always errors.tpl?Indeed, it must be a permission issue. although it's absurdly odd on localhost. WHat if you clear the folder manually and retry? The whole compile folder I mean Link to comment Share on other sites More sharing options...
piyushkeshri Posted March 27, 2015 Share Posted March 27, 2015 I have the same issue and it is really irritating to work on localhost and keep refreshing every time if smarty doesn't compile the template. I removed the cache folder and created the new one but the problem always persist and it is very intermittent. Link to comment Share on other sites More sharing options...
piyushkeshri Posted April 12, 2015 Share Posted April 12, 2015 Recently I downloaded fresh copy of prestashop and replaced my smarty folder with the fresh one. It seems to be working pretty seamlessly. I haven't dig deeper to figure out the reason though, Link to comment Share on other sites More sharing options...
Recommended Posts