我在CakePHP 3.2中編寫了一個應用程序,並且最近上載到了專用服務器。RuntimeException:在CakePHP 3中沒有正確配置Cake Cache Engine FileEngine
但是,這是給RuntimeException的誤差
緩存引擎蛋糕\緩存\發動機\ FileEngine配置不正確。
Warning: file_put_contents(/var/www/html/logs/error.log)
[function.file-put-contents]: failed to open stream: Permission denied in
/var/www/html/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 134
我試圖改變logs
許可,tmp
目錄777(包括子目錄),但這並沒有解決問題。的ls -la
drwxr-xr-x. 13 root root 4096 Oct 22 02:39 .
drwxr-xr-x. 4 root root 43 Oct 12 20:12 ..
drwxr-xr-x. 2 root root 63 Oct 21 15:08 bin
-rw----r--. 1 root root 1499 Oct 21 15:08 composer.json
-rw----r--. 1 root root 48701 Oct 21 15:08 composer.lock
drwxr-xr-x. 3 root root 4096 Oct 21 15:08 config
-rw----r--. 1 root root 329 Oct 21 15:08 .editorconfig
-rw----r--. 1 root root 772 Oct 21 15:08 .gitattributes
-rw----r--. 1 root root 41 Oct 21 15:08 .gitignore
-rw----r--. 1 root root 159 Oct 22 03:02 .htaccess
-rw----r--. 1 root root 648 Oct 21 15:08 index.php
-rw-r--r--. 1 apache apache 20 Oct 13 00:10 info.php
drwxrwxrwx. 2 root root 46 Oct 22 02:30 logs
drwxr-xr-x. 2 root root 10 Oct 21 15:08 mobile_scripts
-rw----r--. 1 root root 1202 Oct 21 15:08 phpunit.xml.dist
drwxr-xr-x. 3 root root 37 Oct 21 15:08 plugins
-rw----r--. 1 root root 1015 Oct 21 15:08 README.md
drwxr-xr-x. 8 root root 4096 Oct 21 15:13 src
drwxr-xr-x. 4 root root 71 Oct 21 15:13 tests
drwxrwxrwx. 6 root root 76 Oct 21 15:13 tmp
-rw----r--. 1 root root 321 Oct 21 15:08 .travis.yml
drwxr-xr-x. 21 root root 4096 Oct 21 15:14 vendor
drwxr-xr-x. 5 root root 4096 Oct 21 15:24 webroot
輸出可能是原因以及如何解決它呢?
你有沒有嘗試過新鮮的cakephp應用程序框架https://github.com/cakephp/app? – makallio85
確保日誌文件夾存在且可寫入。爲什麼一切都是根源?它應該是www數據或類似的,從不根。 – mark
日誌文件夾存在並且可寫。此外,組是根,這是我由服務器管理員給出的,我無權更改它。工作的事情是禁用'SELinux' –