1
votes

I'm trying to migrate my cs-cart multivendor 4.3.8 site to the new server. I have to import database and update the config.local.php file.

But, when I access my site in the new server, I get this error

Fatal error: Uncaught --> Smarty: unable to write file /var/www/html/var/cache/templates/responsive/wrt591a6df1c1b492_68829712 <-- thrown in /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_write_file.php on line 46

Can anyone tell me how to fix this?

2
What have you tried to debug the problem? - Nico Haase

2 Answers

0
votes

I receive the same error. after some search, it seems as permission problem. the permission need to be 644 to all files and 755 to folders.

might also need to clean folders

  • /cache/smarty/compile/
  • /cache/smarty/cache/

or that there is over quota on the server, that disable writing.

https://www.digitalocean.com/community/questions/how-to-fix-php-fatal-error-uncaught-smarty-unable-to-write-file

https://www.prestashop.com/forums/topic/348731-solved-fatal-error-uncaught-exception-smartyexception-with-message-unable-to-write-file/

0
votes

Old post, but it's the first result in Google, so adding this here in case others run into the same problem. Mine wasn't erring on writing the temp file, but on renaming it after. After much head scratching (and triple checking file/directory ownership and permissions), figured out I had to remove the 'rename' option from disabled functions in php.ini.

That's a pretty common function to disable when hardening a system, so someone else might run into this.