简体   繁体   English

致命错误:未捕获 --> Smarty:无法写入文件

[英]Fatal error: Uncaught --> Smarty: unable to write file

I'm trying to migrate my cs-cart multivendor 4.3.8 site to the new server.我正在尝试将我的 cs-cart multivendor 4.3.8 站点迁移到新服务器。 I have to import database and update the config.local.php file.我必须导入数据库并更新 config.local.php 文件。

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致命错误:未捕获 --> Smarty:无法写入文件 /var/www/html/var/cache/templates/responsive/wrt591a6df1c1b492_68829712 <-- 扔在 /var/www/html/app/lib/vendor/smarty/smarty /libs/sysplugins/smarty_internal_write_file.php 第 46 行

Can anyone tell me how to fix this?谁能告诉我如何解决这个问题?

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.所有文件的权限需要为 644,文件夹的权限需要为 755。

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.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/ https://www.prestashop.com/forums/topic/348731-solved-fatal-error-uncaught-exception-smartyexception-with-message-unable-to-write-file/

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.经过多次摸索(并三重检查文件/目录所有权和权限),发现我必须从 php.ini 中的禁用功能中删除“重命名”选项。

That's a pretty common function to disable when hardening a system, so someone else might run into this.这是在强化系统时禁用的一个非常常见的功能,因此其他人可能会遇到这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM