Steps to reproduce
- sudo -u apache /usr/bin/php /var/www/html/owncloud/occ
Expected behaviour
see occ output
Actual behaviour
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/owncloud/lib/private/DB/Connection.php:62
Stack trace:
#0 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(422): OC\DB\Connection->connect()
#1 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(382): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(324): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(685): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/owncloud/lib/private/DB/Connection.php(144): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(195): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/html/owncloud/lib/private/DB/ConnectionFactory.php(134): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/html/owncloud/lib/private/Server.php(533): OC\DB\ConnectionFactory->getConnection(âmysqlâ, Array)
#8 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#9 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(âDatabaseConnectâŚâ)
#10 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(âDatabaseConnectâŚâ)
#11 /var/www/html/owncloud/lib/private/Server.php(1221): OC\ServerContainer->query(âDatabaseConnectâŚâ)
#12 /var/www/html/owncloud/lib/private/Server.php(407): OC\Server->getDatabaseConnection()
#13 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#14 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(âAppConfigâ)
#15 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(âAppConfigâ)
#16 /var/www/html/owncloud/lib/private/Server.php(1151): OC\ServerContainer->query(âAppConfigâ)
#17 /var/www/html/owncloud/lib/private/Server.php(588): OC\Server->getAppConfig()
#18 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#19 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(âAppManagerâ)
#20 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(âAppManagerâ)
#21 /var/www/html/owncloud/lib/private/Server.php(1419): OC\ServerContainer->query(âAppManagerâ)
#22 /var/www/html/owncloud/lib/private/legacy/app.php(343): OC\Server->getAppManager()
#23 /var/www/html/owncloud/lib/private/legacy/app.php(107): OC_App::getEnabledApps()
#24 /var/www/html/owncloud/lib/base.php(585): OC_App::loadApps(Array)
#25 /var/www/html/owncloud/lib/base.php(1059): OC::init()
#26 /var/www/html/owncloud/console.php(74): require_once(â/var/www/html/oâŚâ)
#27 /var/www/html/owncloud/occ(11): require_once(â/var/www/html/oâŚâ)
#28 {main}
Server configuration
Operating system:
CentOS 7.9.2009
Web server:
Apache/2.4.6 (CentOS)
Database:
mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64)
PHP version:
PHP 7.3.27 (cli)
ownCloud version: (see ownCloud admin page)
10.4.1.3
Updated from an older ownCloud or fresh install:
updated from older 10.x.x version
The content of config/config.php:
<?php
$CONFIG = array (
âinstanceidâ => âxxxâ,
âpasswordsaltâ => âxxxâ,
âsecretâ => âxxxâ,
âtrusted_domainsâ =>
array (
0 => âmydomain.comâ,
),
âdatadirectoryâ => â/var/www/html/owncloud/dataâ,
âoverwrite.cli.urlâ => âhttps://mydomain.com/owncloudâ,
âdbtypeâ => âmysqlâ,
âversionâ => â10.4.1.3â,
âdbnameâ => âdbâ,
âdbhostâ => âlocalhostâ,
âdbtableprefixâ => âoc_â,
âdbuserâ => âocuserâ,
âdbpasswordâ => âxxxâ,
âlogtimezoneâ => âUTCâ,
âinstalledâ => true,
âmail_smtpmodeâ => âsmtpâ,
âmail_from_addressâ => âalertsâ,
âmail_domainâ => âxxxâ,
âmail_smtphostâ => âxxxâ,
âmail_smtpportâ => âxxxâ,
âmail_smtpsecureâ => âtlsâ,
âmail_smtpauthtypeâ => âLOGINâ,
âmail_smtpauthâ => 1,
âmail_smtpnameâ => âxxxâ,
âmail_smtppasswordâ => âxxxâ,
âmemcache.localâ => â\OC\Memcache\APCuâ,
âmemcache.lockingâ => â\OC\Memcache\Redisâ,
âfilelocking.enabledâ => true,
âredisâ =>
array (
âhostâ => âlocalhostâ,
âportâ => 6379,
âtimeoutâ => 0.0,
),
âupdater.secretâ => âxxxâ,
âmaintenanceâ => false,
âloglevelâ => 2,
);
Are you using external storage, if yes which one:
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one:
no
Message text
Hi everyone,
âoccâ command does not work anymore after upgrading to 10.4.1, I realized it now that Iâm going to upgrade to 10.5.0.
Server is working fine, clients are working fine, web interface is working fine, I can access my files, clients and server do synchronize, everything is working but âoccâ command, which rises an error:
[root@owncloud config]# sudo -u apache /usr/bin/php /var/www/html/owncloud/occ
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/owncloud/lib/private/DB/Connection.php:62
All PHP mandatory modules seem to be installed:
[root@owncloud config]# rpm -qa|grep php73 |sort
php73-2.0-1.el7.remi.x86_64
php73-php-7.3.27-1.el7.remi.x86_64
php73-php-cli-7.3.27-1.el7.remi.x86_64
php73-php-common-7.3.27-1.el7.remi.x86_64
php73-php-devel-7.3.27-1.el7.remi.x86_64
php73-php-gd-7.3.27-1.el7.remi.x86_64
php73-php-gmp-7.3.27-1.el7.remi.x86_64
php73-php-imap-7.3.27-1.el7.remi.x86_64
php73-php-intl-7.3.27-1.el7.remi.x86_64
php73-php-json-7.3.27-1.el7.remi.x86_64
php73-php-ldap-7.3.27-1.el7.remi.x86_64
php73-php-mbstring-7.3.27-1.el7.remi.x86_64
php73-php-mysqlnd-7.3.27-1.el7.remi.x86_64
php73-php-pdo-7.3.27-1.el7.remi.x86_64
php73-php-pdo-dblib-7.3.27-1.el7.remi.x86_64
php73-php-pecl-apcu-5.1.19-1.el7.remi.x86_64
php73-php-pecl-crypto-0.3.1-5.el7.remi.x86_64
php73-php-pecl-igbinary-3.2.1-1.el7.remi.x86_64
php73-php-pecl-imagick-3.4.4-10.el7.remi.x86_64
php73-php-pecl-imagick-devel-3.4.4-10.el7.remi.x86_64
php73-php-pecl-redis4-4.3.0-1.el7.remi.x86_64
php73-php-pecl-xmldiff-1.1.3-1.el7.remi.x86_64
php73-php-pecl-xmldiff-devel-1.1.3-1.el7.remi.x86_64
php73-php-pecl-zip-1.19.2-1.el7.remi.x86_64
php73-php-process-7.3.27-1.el7.remi.x86_64
php73-php-smbclient-1.0.4-1.el7.remi.x86_64
php73-php-xml-7.3.27-1.el7.remi.x86_64
php73-php-xmlrpc-7.3.27-1.el7.remi.x86_64
php73-runtime-2.0-1.el7.remi.x86_64
What can be the issue ? How can I fix it ? Because without occ I canât maintain and upgrade my owncloud server.
Thanks.