Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database

I’m running Nextcloud on a Virtualmin environment (on Ubuntu 16.04) from a few months without any problems.

Last system upgrade cause Nextcloud to stop working: cannot access with clients (internal server error), unable to load web interface. This are the errors logs:

mod_fcgid: stderr: PHP Fatal error:  Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /home/myuser/domains/app.mydomain.it/public_html/nextcloud/lib/private/DB/Connection.php:60
mod_fcgid: stderr: Stack trace:
mod_fcgid: stderr: #0 /home/myuser/domains/app.mydomain.it/public_html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\\DB\\Connection->connect()
mod_fcgid: stderr: #1 /home/myuser/domains/app.mydomain.it/public_html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()
mod_fcgid: stderr: #2 /home/myuser/domains/app.mydomain.it/public_html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\\DBAL\\Connection->detectDatabasePlatform()
mod_fcgid: stderr: #3 /home/myuser/domains/app.mydomain.it/public_html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\\DBAL\\Connection->getDatabasePlatform()
mod_fcgid: stderr: #4 /home/myuser/domains/app.mydomain.it/public_html/nextcloud/lib/private/D in /home/myuser/domains/app.mydomain.it/public_html/nextcloud/lib/private/DB/Connection.php on line 60

So I update Nextcloud (without problems) to the last stable version 11.0.1, but this doesn’t solve the problem.

Some ideas?

TIA

Following Nextcloud installation instructions I checked the installation of all packages and I found that php7.0-mysql was missing (don’t ask me why…).

1 Like