【问题标题】:Error Cache cannot write able in Cakephp version 2.7错误缓存无法在 Cakephp 2.7 版中写入
【发布时间】:2015-09-22 03:16:45
【问题描述】:

我在 Cakephp 2.7 版中遇到了缓存问题。当我尝试将其上传到真实服务器时,会出现以下消息。

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/equalwedding/lib/Cake/Cache/Cache.php on line 328 Warning: /var/www/html/equalwedding/app/tmp/cache/persistent/ is not writable in /var/www/html/equalwedding/lib/Cake/Cache/Engine/FileEngine.php on line 385 Fatal error: Uncaught exception 'CacheException' with message 'Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct' in /var/www/html/equalwedding/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /var/www/html/equalwedding/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /var/www/html/equalwedding/app/Config/core.php(374): Cache::config('_cake_core_', Array) #2 /var/www/html/equalwedding/lib/Cake/Core/Configure.php(72): include('/var/www/html/e...') #3 /var/www/html/equalwedding/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /var/www/html/equalwedding/app/webroot/index.php(104): include('/var/www/html/e...') #5 /var/www/html/equalwedding/index.php(41): require('/var/www/html/e...') #6 {main} thrown in /var/www/html/equalwedding/lib/Cake/Cache/Cache.php on line 186 

我必须尝试将文件夹缓存的权限设置为 777,但仍然显示错误。

我该如何解决这个问题?

【问题讨论】:

  • 您是否在谷歌上搜索了错误并尝试了不同的建议?您尝试了哪些方法,结果如何?
  • 我尝试打开权限并将文件夹缓存设置为777,但仍然显示错误。

标签: php cakephp-2.0 cakephp-2.3


【解决方案1】:

请检查 app/tmp/cache/models 和 app/tmp/cache/persistent 是否存在且可写。

如果仍然存在,请尝试清理旧缓存并再次检查。

【讨论】:

  • 哦,你是对的。我有他们两个,但权限是不可写的。所以我刚刚更改了文件夹的权限,它工作了。谢谢。
【解决方案2】:

我遇到了这个错误。我检查了我的应用程序位置是否存在此缓存文件。

他们不在。

[08-Oct-2018 05:44:32 GMT] PHP Warning:  C:\wamp64\www\app\admin\tmp\cache\persistent\ is not writable in C:\wamp64\www\app\lib\Cake\Cache\Engine\FileEngine.php on line 385

然后我在 app/admin/tmp/cache/persistent 中创建“持久”文件。它工作得很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-28
    • 2016-11-28
    • 2013-08-15
    • 2011-11-26
    • 1970-01-01
    • 2014-08-03
    • 2013-04-15
    • 2012-10-10
    相关资源
    最近更新 更多