CakePHP错误:cake_core_ cache无法编写' cake_dev_en-us'在Centos上

时间:2017-08-26 07:07:38

标签: php linux caching centos

我几乎尝试了一切来解决这个问题,但仍然无法正常工作:(。错误如下。

`Warning: _cake_core_ cache was unable to write 'cake_dev_cs' to File cache in /var/www/html/orangescrum/lib/Cake/Cache/Cache.php on line 325

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

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

最常见的建议(文件夹的权限问题 - / var / www / html / orangescrum / ...应该使用以下方法修复:

chmod -R 777 /var/www/html/orangescrum

为确保有权限检查:

[root@hubud0635 orangescrum]# stat -c %a app
777
[root@hubud0635 orangescrum]# cd app
[root@hubud0635 app]# ls -a
.   Config   Controller  index.php  Locale  Plugin  tmp     View
..  Console  .htaccess   Lib        Model   Test    Vendor  webroot
[root@hubud0635 app]# stat -c %a tmp
777

缓存中的子文件夹是现有的:

[root@hubud0635 tmp]# cd cache
[root@hubud0635 cache]# ls -a
.  ..  models  persistent  views

我为应用程序Orangescrum创建了一个主机文件。此文件的内容如下。

<VirtualHost *:80>
DocumentRoot /var/www/html/orangescrum
ServerName localhost
ServerAlias localhost
<Directory /var/www/html/orangescrum>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>

如果还有其他问题,请问我。非常感谢你!

1 个答案:

答案 0 :(得分:0)

CentOS默认启用SElinux。

sestatus

会显示它是否真的有效。

如何停用它:

vi /etc/sysconfig/selinux
update line to: SELINUX=disabled
reboot