Ich habe eine Anwendung in CakePHP 3.2 geschrieben und kürzlich auf einen dedizierten Server hochgeladen.RuntimeException: Cake Cache Engine FileEngine ist nicht korrekt konfiguriert in CakePHP 3
Aber dies gibt Runtime Fehler als
Cache-Engine Kuchen \ Cache \ Engine \ FileEngine ist nicht richtig konfiguriert.
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
Ich habe versucht, mit freundlicher Genehmigung von logs
und tmp
Verzeichnis auf 777 zu ändern (einschließlich Unterverzeichnisse), aber dies das Problem nicht lösen.
Ausgabe von 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
Was die Ursache sein könnte und wie es zu lösen?
Haben Sie versucht mit frischen CakePHP App Skelett https://github.com/cakephp/app? – makallio85
Stellen Sie sicher, dass der Protokollordner vorhanden und beschreibbar ist. Und warum ist alles Wurzel? Es sollte www-data oder gleich sein, niemals root. – mark
Protokolle Ordner existierten und waren beschreibbar. Auch Gruppe ist root und das ist, was ich vom Server-Administrator bekommen habe und ich habe kein Recht, es zu ändern. Das Ding, das funktionierte, ist 'SELinux' zu sperren –