Cakephp缓存不可写错误消息

时间:2014-11-22 18:45:43

标签: php cakephp file-permissions chmod

我有Fedora18并且正在尝试安装cakephp。但它显示

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/cakem2/lib/Cake/Cache/Cache.php on line 323

Warning: /var/www/html/cakem2/app/tmp/cache/persistent/ is not writable in /var/www/html/cakem2/lib/Cake/Cache/Engine/FileEngine.php on line 385

Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /var/www/html/cakem2/lib/Cake/Cache/Cache.php:181 Stack trace: #0 /var/www/html/cakem2/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /var/www/html/cakem2/app/Config/core.php(374): Cache::config('_cake_core_', Array) #2 /var/www/html/cakem2/lib/Cake/Core/Configure.php(72): include('/var/www/html/c...') #3 /var/www/html/cakem2/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /var/www/html/cakem2/app/webroot/index.php(94): include('/var/www/html/c...') #5 /var/www/html/cakem2/index.php(41): require('/var/www/html/c...') #6 {main} thrown in /var/www/html/cakem2/lib/Cake/Cache/Cache.php on line 181

在答案Similar Question之后,我使所有目录和子目录都可写,如Screenshot所示。但我仍然得到错误!怎么了?

1 个答案:

答案 0 :(得分:2)

chown文件夹/文件,以便用户匹配httpd或Apache用来访问这些文件的用户。我不知道fedora的用户,我认为它的apache或httpd。在ubuntu中有www-data。

http://fedoraproject.org/wiki/Administration_Guide_Draft/Apache