Jump to content

Fatal error: Uncaught --> Smarty: unable to write file /cache/smarty/cache/


Recommended Posts

 
 

Good afternoon. After the upgrade, prestashop 1.6.1.1 I have a problem with the cache. produces errors such as Fatal error: Uncaught -> Smarty: unable to write file /cache/smarty/cache/blockcategories/1/1/1/1/2/216/2/1/03/c7/9e/03c79efe47c4087f646c733f78da30216a903e20.blockcategories.tpl.php <- Thrown in /home/bijuoptcyx/www/tools/smarty/sysplugins/smarty_internal_write_file.php on line 74, or "on line 46," I use the hosting OVH, permissions on the folder and cache files and sub-folders is 775, by using Memcached PHP :: Memkache. My configuration information about the server

Information about the server Linux # 1 SMP Wed Feb 25 15:03:06 UTC 2015 x86_64

Version of the Apache Web Server

Version PHP 5.6.6

Available memory 512M

Max Runtime 6000post-474133-0-12134700-1440175578_thumb.pngpost-474133-0-50386000-1440175635_thumb.pngpost-474133-0-12134700-1440175578_thumb.png

Link to comment
Share on other sites

  • 4 weeks later...

Same thing happens to me:

 

PHP Fatal error:  Uncaught  --> Smarty: unable to write file /cache/smarty/cache\blockcategories\1\1\9\1\de\69\09\de69092ed9f0134dc68e0d7ce6255cfbe9038cd3.blockcategories_footer.tpl.php <-- 
  thrown in tools\smarty\sysplugins\smarty_internal_write_file.php on line 74
Link to comment
Share on other sites

  • 4 months later...

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/imitalac/public_html/admin388zjweix/themes/default/template/controllers/modules/login_addons.tpl" on line 40 "<a href="{$addons_register_link|escape:'html':'UTF-8'}"><img class="img-responsive center-block" src="themes/default/img/prestashop-addons-logo.png" alt="Logo PrestaShop Addons"/></a>" unknown modifier "escape" <-- thrown in /home/imitalac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 40


 


CAN ANYONE HELP ME I M STUCK WITH THIS ERROR


WHILE RESTORING FROM OLD BACKUP TO SERVER


Link to comment
Share on other sites

  • 1 year later...

This can be a Smarty/PHP limitation. Smarty doesn't have enough entropy to generate a unique filename for cache files: http://www.smarty.net/forums/viewtopic.php?p=78073&sid=f7453895d04e5e7041f3eec4ccc67d2c#78073

 

The trick is to wait a millisecond before trying to write the cache file to the disk, in case of a collision. Replace the contents of the file /classes/SmartyCustom.php with the following code snippet in order to make Smarty wait, then try again when there's a collision: http://www.smarty.net/forums/viewtopic.php?p=78073&sid=f7453895d04e5e7041f3eec4ccc67d2c#78073

This file should at least be compatible with PS 1.6.1.x

 

 

what file, please?

you didn't provide a link to the modified file...

 

where SmartyCustom.php needs to be changed?

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...