Wie ich Nextcloud PHP Fatal error behoben habe: Class contains 1 abstract method and must therefore be declared abstract

English Deutsch

Kürzlich gab meine Nextcloud 16-Instanz (die über PHP 7.2 FPM auf Nginx läuft) beim Zugriff HTTP-Status 500 (interner Serverfehler) zurück.

Die Analyse des Webserver-Logs enthüllte diese Fehlermeldung:

nextcloud_php_fatal.txt
FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class OC\Authentication\Token\PublicKeyToken contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (OC\Authentication\Token\IToken::setExpires) in /var/sites/nextcloud.mydomain.com/lib/private/Authentication/Token/PublicKeyToken.php on line 47" while reading response header from upstream, client: 2003:ea:b747:ee00:7491:f492:480:57a9, server: nextcloud.mydomain.com, request: "PROPFIND /remote.php/dav/files/admin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "nextcloud.mydomain.com"

Nach etwas Recherche fand ich heraus, dass - zumindest in meinem Fall - das Problem durch Leeren des PHP-Opcache behoben werden konnte:

reload_php_fpm.sh
sudo service php7.2-fpm reload

Danach funktionierte Nextcloud wieder ordnungsgemäß.


Check out similar posts by category: Nextcloud, PHP