Owncloud Postgresql Could Not Find Driver

19.08.2019
  1. Owncloud Postgresql Could Not Find Driver

Steps to reproduce

Ubuntu 14.04 - Postgresql 9.3 - Apache2 - PHP5+pgsql.so Install wizard error: error trying to create admin user: failed to connect to the database: an exception.

  1. update php using: sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
    sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
    php5.6-apcu php5.6-zip php5.6-gd php5.6-curl
    sudo a2dismod php5
    sudo a2enmod php5.6
    sudo service apache2 restart
    Tried mysql and phpmyadmin and working
  2. run automated update (synaptic) to update Owncloud to latest version (10.0)
  3. run owncloud update and got:
    #######################
    /var/www/owncloud$ sudo -u www-data php occ upgrade
    [sudo] password for viking:
    An unhandled exception has been thrown:
    DoctrineDBALDBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /var/www/owncloud/lib/private/DB/Connection.php:63
    Stack trace:
    #0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OCDBConnection->connect()
    #1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): DoctrineDBALConnection->getDatabasePlatformVersion()
    #2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): DoctrineDBALConnection->detectDatabasePlatform()
    #3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): DoctrineDBALConnection->getDatabasePlatform()
    #4 /var/www/owncloud/lib/private/DB/Connection.php(146): DoctrineDBALConnection->setTransactionIsolation(2)
    #5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OCDBConnection->__construct(Array, Object(DoctrineDBALDriverPDOMySqlDriver), Object(DoctrineDBALConfiguration), Object(DoctrineCommonEventManager))
    #6 /var/www/owncloud/lib/private/DB/ConnectionFactory.php(136): DoctrineDBALDriverManager::getConnection(Array, Object(DoctrineDBALConfiguration), Object(DoctrineCommonEventManager))
    #7 /var/www/owncloud/lib/private/Server.php(461): OCDBConnectionFactory->getConnection('mysql', Array)
    #8 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OCServer->OC{closure}(Object(OCServer))
    #9 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): PimpleContainer->offsetGet('DatabaseConnect...')
    #10 /var/www/owncloud/lib/private/ServerContainer.php(87): OCAppFrameworkUtilitySimpleContainer->query('DatabaseConnect...')
    #11 /var/www/owncloud/lib/private/Server.php(1101): OCServerContainer->query('DatabaseConnect...')
    #12 /var/www/owncloud/lib/private/Server.php(226): OCServer->getDatabaseConnection()
    #13 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OCServer->OC{closure}(Object(OCServer))
    #14 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): PimpleContainer->offsetGet('UserManager')
    #15 /var/www/owncloud/lib/private/ServerContainer.php(87): OCAppFrameworkUtilitySimpleContainer->query('UserManager')
    #16 /var/www/owncloud/lib/private/Server.php(953): OCServerContainer->query('UserManager')
    #17 /var/www/owncloud/lib/private/Server.php(267): OCServer->getUserManager()
    #18 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OCServer->OC{closure}(Object(OCServer))
    #19 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): PimpleContainer->offsetGet('UserSession')
    #20 /var/www/owncloud/lib/private/ServerContainer.php(87): OCAppFrameworkUtilitySimpleContainer->query('UserSession')
    #21 /var/www/owncloud/lib/private/Server.php(970): OCServerContainer->query('UserSession')
    #22 /var/www/owncloud/lib/private/Server.php(507): OCServer->getUserSession()
    #23 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OCServer->OC{closure}(Object(OCServer))
    #24 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): PimpleContainer->offsetGet('AppManager')
    #25 /var/www/owncloud/lib/private/ServerContainer.php(87): OCAppFrameworkUtilitySimpleContainer->query('AppManager')
    #26 /var/www/owncloud/lib/private/Server.php(1288): OCServerContainer->query('AppManager')
    #27 /var/www/owncloud/lib/private/legacy/app.php(310): OCServer->getAppManager()
    #28 /var/www/owncloud/lib/private/legacy/app.php(106): OC_App::getEnabledApps()
    #29 /var/www/owncloud/lib/base.php(579): OC_App::loadApps(Array)
    #30 /var/www/owncloud/lib/base.php(994): OC::init()
    #31 /var/www/owncloud/console.php(57): require_once('/var/www/ownclo...')
    #32 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
    #33 {main}PHP Fatal error: Uncaught DoctrineDBALDBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /var/www/owncloud/lib/private/DB/Connection.php:63
    Stack trace:
    #0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OCDBConnection->connect()
    #1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): DoctrineDBALConnection->getDatabasePlatformVersion()
    #2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): DoctrineDBALConnection->detectDatabasePlatform()
    #3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): DoctrineDBALConnection->getDatabasePlatform()
    #4 /var/www/owncloud/lib/private/DB/Connection.php(146): DoctrineDBALConnection->setTransactionIsolation(2)
    #5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OCDBConnection->__construct(Array, Object(DoctrineDBALDriverPDOMySqlDriver), Object(DoctrineD in
    #################################

Expected behaviour

Find

Tell us what should happen
Owncloud should have updated normally

Actual behaviour

Tell us what happens instead
Errors as shown above Owncloud server cannot start

Server configuration

Operating system:
Ubuntu 14.04.5
Linux Sibyl 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Web server:
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jul 15 2016 15:34:04
Database:
mysql Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (x86_64) using readline 6.3

PHP version:
php -v
PHP 7.1.4-1+deb.sury.orgtrusty+1 (cli) (built: Apr 11 2017 22:45:20) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.4-1+deb.sury.org
trusty+1, Copyright (c) 1999-2017, by Zend Technologies

ownCloud version: (see ownCloud admin page) version 10.0 I think (latest)

Updated from an older ownCloud or fresh install:
Updated from 9.1x
Where did you install ownCloud from:
used ppa from Owncloud and synaptic package manager as had been done successfully for previous owncloud versions

Signing status (ownCloud 9.0 and above):

Cannot sign into my ownCloud server because it's broken all I see is:
Update needed
Please use the command line updater because you have a big instance.

For help, see the documentation.

The content of config/config.php:

Could

Owncloud Postgresql Could Not Find Driver

false, 'instanceid' => 'xxxxxxx', 'passwordsalt' => 'xxxxxxx', 'secret' => 'xxxxxxxxxxxx', 'trusted_domains' => array ( 0 => 'localhost', 1 => '192.168.1.10', 2 => 'xxr', 3 => 'xxl', 4 => 'xxx.xxx.xx.x49', 5 => 'xxr', 6 => 'xx', ), 'datadirectory' => '/carbonics/owncloud', 'overwrite.cli.url' => 'https://localhost/owncloud', 'dbtype' => 'mysql', 'version' => '9.1.5.2', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_xxxxx', 'dbpassword' => 'xxxxx', 'logtimezone' => 'UTC', 'installed' => true, 'memcache.local' => 'OCMemcacheAPCu', 'maintenance' => false, 'ldapIgnoreNamingRules' => false, 'loglevel' => 3, 'session_lifetime' => 1728000, 'session_keepalive' => true, 'mail_from_address' => 'cloud', 'mail_smtpmode' => 'php', 'mail_domain' => 'xx.com',);```Log in to the web-UI with an administrator account and click on'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'This report includes the config.php settings, the list of activated appsand other details in a well sanitized form.or If you have access to your command line run e.g.:sudo -u www-data php occ config:list systemfrom within your ownCloud installation folder*ATTENTION:* Do not post your config.php file in public as is. Please use one of the abovemethods whenever possible. Both, the generated reports from the web-ui and from occ config:listconsistently remove sensitive data. You still may want to review the report before sending.If done manually then it is critical for your own privacy to dilligentlyremove *all* host names, passwords, usernames, salts and other credentials before posting.You should assume that attackers find such information and will use them against your systems.```**List of activated apps:**```If you have access to your command line run e.g.:sudo -u www-data php occ app:listfrom within your ownCloud installation folder.```**Are you using external storage, if yes which one:** local/smb/sftp/...**Are you using encryption:** yes/no**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...#### LDAP configuration (delete this part if not used)```With access to your command line run e.g.:sudo -u www-data php occ ldap:show-configfrom within your ownCloud installation folderWithout access to your command line download the data/owncloud.db to your localcomputer or access your SQL server remotely and run the select query:SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.```### Client configuration**Browser:****Operating system:**### Logs#### Web server error log```Insert your webserver log here```#### ownCloud log (data/owncloud.log)```Insert your ownCloud log here```nothing in this file#### Browser log```Insert your browser log here, this could for example include:a) The javascript console logb) The network log c) ...```
Comments are closed.