Probleme mit Cron nach Update auf OC9.1

Bitte die folgenden Infos bereit stellen.

Schritte zum Reproduzieren
1. sudo -u www-data php -f /var/www/owncloud/cron.php

Erwartetes Verhalten
Cron sollte ausgeführt werden.

Aktuelles Verhalten

PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: could not find driver' in /var/www/owncloud/lib/private/DB/Connection.php:58
Stack trace:
0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
1 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
3 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
4 /var/www/owncloud/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)
5 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doct in /var/www/owncloud/lib/private/DB/Connection.php on line 58
PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: could not find driver' in /var/www/owncloud/lib/private/DB/Connection.php:58
Stack trace:
0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
1 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
3 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
4 /var/www/owncloud/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)
5 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doct in /var/www/owncloud/lib/private/DB/Connection.php on line 58

Server-Konfiguration
Betriebssystem: Ubuntu Server 14.04.5 LTS
Webserver-Typ:Apache 2.4.7
Datenbank-Typ: MySQL
PHP-Version: 5.6.24
ownCloud-Version (siehe ownCloud Administrationsseite): 9.1 Stable
Von einer älteren ownCloud-Version aktualisiert oder neu installiert?: 9.0
ownCloud log (data/owncloud.log, siehe https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

Sonderkonfigurationen (external storage, external authentication, reverse proxy, server-side-encryption):
external storage

Integrity status für oC9+

Logge Dich als Admin in Deine ownCloud Instanz ein, öffne
http://example.com/index.php/settings/integrity/failed
und kopiere das Ergebnis hier.
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- files_antivirus
	- EXTRA_FILE
		- README.md
		- CONTRIBUTING.md
Raw output
==========
Array
(
    [files_antivirus] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [README.md] => Array
                        (
                            [expected] => 
                            [current] => d197f4b4e0a845261162fdc8ad5a500e579c68c9306471558da14eb3474b70889772fd88fea1161be341421c4dba3bbc63c5e85a8378b38a75d76dbdb1e3264a
                        )
                    [CONTRIBUTING.md] => Array
                    (
                        [expected] => 
                        [current] => 0de5eddd29b6be1a62c71bf217edf2c5b163916842f9976326d5254e14853fc138692ede064994a934cc911b0cd42a502db20e7be0f867af9a4c631a61ace4dc
                    )

            )

    )

Hi,

wie folgende Fehlermeldung aussagt:

fehlen Deinem PHP Setup die entsprechenden Datenbank-Treiber für die "cli" Umgebung von PHP (wenn php über z.B. ein terminal ausgeführt wird.

Wenn Du folgenden Befehl in Deinem Terminal ausführst:

php -i | grep "pdo"

sollte es zu folgender Ausgabe kommen:

/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
API Extensions => mysql,mysqli,pdo_mysql
pdo_mysql
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock

Fehlt dies ist Dein PHP falsch konfiguriert.

Hi,

vielen Dank für deine Antwort.

Die Ausgabe ist:
/etc/php/5.6/cli/conf.d/10-pdo.ini,

Vor dem Update auf 9.1 war aber zumindest beim Cron Job alles in Ordnung. Zumindest hatte ich nie dieses Problem.
Ich weiß leider nicht was ich bei PHP nun richtig konfiguieren müsste.

Der Inhalt der 20-pdo_mysql.ini sieht so aus
; configuration for php MySQL module
; priority=20
extension=pdo_mysql.so

Grüße
Dirk

Hi,

da solltest Du ggf. mal in einer Ubuntu Community nachfragen. Irgendwie wird pdo_mysql.so nicht für die PHP cli variante geladen und aus dem Grund bekommst Du die Fehlermeldung im cron.

So habe es hingebogen

/etc/php/5.6$ php -i | grep "pdo"
/etc/php/5.6/cli/conf.d/10-pdo.ini,
/etc/php/5.6/cli/conf.d/20-pdo_mysql.ini,
pdo_mysql
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock

Das manuelle Aufrufen von den Cron bringt keine Fehlermedlung mehr.

/etc/php/5.6$ sudo -u www-data php -f /var/www/owncloud/cron.php

Allerdings möchte Cron immer noch nicht. Die Adminpage zeigt immer noch letzte Ausführung vor 8 Tagen

Im Log habe ich das danach gefunden:

Call to undefined function OC\AppFramework\simplexml_load_file() at /var/www/owncloud/lib/private/AppFramework/App.php#59

Diese Fehlermeldung erscheint nun alle 15 min. So wie die Cron Ausführung geplant ist.

Da fehlt Dir das nächste Paket: php5-xml oder so ähnlich.