php - CakePHP 缓存无法在 Centos 7 中写入

标签 php apache cakephp permissions centos7

我尝试了想到的一切。我有一个标准错误:

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/symulacje/inz.com/public_html/lib/Cake/Cache/Cache.php on line 328

Warning: /var/www/html/symulacje/inz.com/public_html/app/tmp/cache/persistent/ is not writable in /var/www/html/symulacje/inz.com/public_html/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/symulacje/inz.com/public_html/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /var/www/html/symulacje/inz.com/public_html/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /var/www/html/symulacje/inz.com/public_html/app/Config/core.php(374): Cache::config('_cake_core_', Array) #2 /var/www/html/symulacje/inz.com/public_html/lib/Cake/Core/Configure.php(72): include('/var/www/html/s...') #3 /var/www/html/symulacje/inz.com/public_html/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /var/www/html/symulacje/inz.com/public_html/app/webroot/index.php(104): include('/var/www/html/s...') #5 /var/www/html/symulacje/inz.com/public_html/index.php(41): require('/var/www/html/s...') #6 {main} thrown in /var/www/html/symulacje/inz.com/public_html/lib/Cake/Cache/Cache.php on line 186

应用 775 的 Chmod:

drwxrwxr-x. 14 apache apache 4096 05-23 10:36 .
drwxrwxr-x.  8 apache apache 4096 05-23 10:36 ..
drwxrwxr-x.  3 apache apache 4096 05-23 11:43 Config
drwxrwxr-x. 16 apache apache 4096 05-23 10:36 Console
drwxrwxr-x.  3 apache apache 4096 05-23 10:36 Controller
-rwxrwxr-x.  1 apache apache  140 05-23 10:36 .htaccess
-rwxrwxr-x.  1 apache apache  689 05-23 10:36 index.php
drwxrwxr-x.  2 apache apache   34 05-23 10:36 Lib
drwxrwxr-x.  3 apache apache   16 05-23 10:36 Locale
drwxrwxr-x.  4 apache apache 4096 05-23 10:36 Model
drwxrwxr-x.  2 apache apache   18 05-23 10:36 Plugin
drwxrwxr-x.  4 apache apache   31 05-23 10:36 Test
drwxrwxr-x.  7 apache apache   68 05-23 10:36 tmp
drwxrwxr-x.  2 apache apache   18 05-23 10:36 Vendor
drwxrwxr-x. 12 apache apache 4096 05-23 10:36 View
drwxrwxr-x.  9 apache apache 4096 05-23 11:26 webroot

和 tmp/cache/777:

drwxrwxrwx. 4 apache apache 36 05-23 10:36 .
drwxrwxrwx. 7 apache apache 68 05-23 10:36 ..
drwxrwxrwx. 2 apache apache  6 05-23 11:16 models
drwxrwxrwx. 2 apache apache  6 05-23 11:16 persistent

我不知道我哪里有问题。

最佳答案

好的,这对我有帮助:

setsebool -P httpd_unified 1

把这个放在控制台

关于php - CakePHP 缓存无法在 Centos 7 中写入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30412433/

相关文章:

php - 在 ANT 构建脚本中使用 Jenkins 和 PHP 代码嗅探器

php - 从 file_get_contents 获取 POST 数据

php - 每当我在表中添加多行数据时,都会收到错误消息 '' 获取未知属性”

javascript - 将 PHP 数组转换为 JavaScript

linux - access.log 的大小和服务器负载?

php - session ,PHP 不完整类

php - 将数组传递给 CakePHP 中的 requestAction

php - mod_rewrite : Trailing slash on URL with two GET variables

php - Apache2 access.log 对于相同的数据包不同

php - CakePHP 3 - 在依赖关联的情况下使用关联保存数据