未捕获的异常'RuntimeException',消息'无法在缓存目录中写入

时间:2017-08-18 14:17:36

标签: symfony

当我尝试在服务器上部署我的网站时出现此错误:

  

致命错误:/ home / e120223 / public_html / ReclyZone / vendor /中未捕获的异常'RuntimeException',消息'无法写入缓存目录(/ home / e120223 / public_html / ReclyZone / app / cache / prod)' symfony / symfony / src / Symfony / Component / HttpKernel / Kernel.php:597堆栈跟踪:#0 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(510 ):Symfony \ Component \ HttpKernel \ Kernel-> buildContainer()#1 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(133):Symfony \ Component \ HttpKernel \ Kernel-> initializeContainer()#2 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(182):symfony \ Component \ HttpKernel \ Kernel- > boot()#3 /home/e120223/public_html/ReclyZone/web/app.php(16):Symfony \ Component \ HttpKernel \ Kernel-> handle(Object(Symfony \ Component \ HttpFoundation \ Request))#4 {main}抛出/ home / e120223 / public_html / ReclyZone / vend或者第597行的/ symfony / symfony / src / Symfony / Component / HttpKernel / Kernel.php

我已经清除了缓存,但没有任何效果,你有什么想法吗?

2 个答案:

答案 0 :(得分:0)

缓存目录上的

chmod -R 777以授予读写权限

答案 1 :(得分:-1)

问题是您没有权限在该缓存目录中写入 我会将默认缓存目录更改为可写文件夹。

请参阅官方文档http://symfony.com/doc/current/configuration/override_dir_structure.html#override-cache-dir