Problems after updating to 28.0.1 - maybe missing php modules?

Hello,

since updating to Nextcloud 28.0.1 of my self hosted proxmox LXC i have the problem, that in the nextcloud overview the error appears:

…missing indices … execute “occ db:add-missing-indices”

So executed in the terminal

sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices

But then i got this error:

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud/lib/private/DB/Connection.php:139
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1654): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1081): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(337): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(377): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(418): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\AppConfig->loadConfigValues()
#8 /var/www/nextcloud/lib/private/AppConfig.php(374): OC\AppConfig->getApps()
#9 /var/www/nextcloud/lib/private/App/AppManager.php(128): OC\AppConfig->getValues()
#10 /var/www/nextcloud/lib/private/App/AppManager.php(149): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/nextcloud/lib/private/legacy/OC_App.php(231): OC\App\AppManager->getInstalledApps()
#12 /var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
#13 /var/www/nextcloud/lib/base.php(700): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /var/www/nextcloud/lib/base.php(1200): OC::init()
#15 /var/www/nextcloud/console.php(48): require_once('...')
#16 /var/www/nextcloud/occ(11): require_once('...')

Some other users had the same problem, as i have seen in the internet. They told, that some PHP modules where missing. This are my installed PHP modules:

Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, memcache, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

I am also a bit confused about the php versions. Nextcloud tells that i am using PHP 8.2.14 but php -v tells me PHP8.3.1

I hope you can help.

Hi,

I would go for the php version problem first

But you can check your php modules with:
php -m |grep sql

Let me know :slight_smile:

Thanks for your answer. The thing is that bevore updating Nextcloud it has worked with the different PHP versions.

I tried php -m |grep sql but nothing happend in the console.

Hi,

we should first resolve the php problem.
Please send:
ls -al /etc/alternatives/php*

this was the output:

lrwxrwxrwx 1 root root 15 Nov 30 18:43 /etc/alternatives/php -> /usr/bin/php8.3
lrwxrwxrwx 1 root root 24 Jan 18 09:13 /etc/alternatives/php-fpm.sock -> /run/php/php8.2-fpm.sock
lrwxrwxrwx 1 root root 31 Nov 30 18:43 /etc/alternatives/php.1.gz -> /usr/share/man/man1/php8.3.1.gz
lrwxrwxrwx 1 root root 18 Nov 30 18:43 /etc/alternatives/phpdbg -> /usr/bin/phpdbg8.3
lrwxrwxrwx 1 root root 34 Nov 30 18:43 /etc/alternatives/phpdbg.1.gz -> /usr/share/man/man1/phpdbg8.3.1.gz

Ok, you can remove 8.3 and install and activate 8.2 as recommendet for this version. As you can see is your php mixed up.
Here you find a general documantation and infos howto doit:

thanks. Problem solved. I removed 8.3 and executed:

Now i didnt get the error anymore