Failed to connect to Database

After upgrading from 12 beta to 12 RC4 I got the following issue:


Nextcloud version (eg, 10.0.2): 12 RC4
Operating system and version (eg, Ubuntu 16.04): Debian GNU/Linux 9
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.25 (Debian)
PHP version (eg, 5.6): PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
Is this the first time you’ve seen this error?: Yes

The issue you are facing:

Nextcloud does not come up.

The output of your Nextcloud log in Admin > Logging:

Updatelog:

2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] request to updater
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] currentStep()
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] show HTML page
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] current version: 12.0.0 build time: 2017-05-22T08:27:00+00:00 98e26f8b5c8b238e7f3556e900c524ce78bde95a
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] getUpdateServerResponse()
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] releaseChannel: beta
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] internal version: 12.0.0.29
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] updateURL: https://updates.nextcloud.org/updater_server/?version=12x0x0x29xxxbetaxx2017-05-22T08%3A27%3A00%2B00%3A00+98e26f8b5c8b238e7f3556e900c524ce78bde95ax5x6x30
2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] getUpdateServerResponse response: Array
(
[version] => 12.0.1.3
[versionstring] => Nextcloud 12.0.1 RC4
[url] => https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => YojqdYWbre2Zr9DAwFbjI2QtFdEA84C2NRWymN/MjbJkUS9oBMv9+D911vJ5UBoi
Qiyws4B4KyHMWJfKaXQlGLMbgL/nZFQh3T8u9vYhULmhkJGIa7W9tJjfUzQO+PYM
RuXtapyQ2jKSu7qCDkHVNamYLAoS7hY2sbEoqKJDgV6ZpqbUYnbQGzBODSaaz6cQ
TsSOtKKPDlQoF+b045EQni5A9YGrzmCsGrUaPQYxgvprcmTOIilvnSL48RS5T1GP
1pLqaNBltmSp58P0olBqdDMuF1k99Rq1xbQ+94upcntdnF/vzjwjfsK/+IWl7yV5
Gw3uk0kCB6RE+5bdKoyq5w==
)

2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] checkForUpdate() Array
(
[version] => 12.0.1.3
[versionstring] => Nextcloud 12.0.1 RC4
[url] => https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => YojqdYWbre2Zr9DAwFbjI2QtFdEA84C2NRWymN/MjbJkUS9oBMv9+D911vJ5UBoi
Qiyws4B4KyHMWJfKaXQlGLMbgL/nZFQh3T8u9vYhULmhkJGIa7W9tJjfUzQO+PYM
RuXtapyQ2jKSu7qCDkHVNamYLAoS7hY2sbEoqKJDgV6ZpqbUYnbQGzBODSaaz6cQ
TsSOtKKPDlQoF+b045EQni5A9YGrzmCsGrUaPQYxgvprcmTOIilvnSL48RS5T1GP
1pLqaNBltmSp58P0olBqdDMuF1k99Rq1xbQ+94upcntdnF/vzjwjfsK/+IWl7yV5
Gw3uk0kCB6RE+5bdKoyq5w==
)

2017-08-02T11:37:24+0200 JYP9FhCDB7 [info] end of checkForUpdate() Update to Nextcloud 12.0.1 RC4 available. (channel: “beta”)
Following file will be downloaded automatically: https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] request to updater
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] currentStep()
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] POST request for step "1"
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] startStep(“1”)
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] checkForExpectedFilesAndFolders()
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] end of checkForExpectedFilesAndFolders()
2017-08-02T11:37:28+0200 Ss4qhqNp8E [info] endStep(“1”)
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] request to updater
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] currentStep()
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] Step 1 is in state “end”.
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] POST request for step "2"
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] startStep(“2”)
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] checkWritePermissions()
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] end of checkWritePermissions()
2017-08-02T11:37:28+0200 F0MQpUAHNQ [info] endStep(“2”)
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] request to updater
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] currentStep()
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] Step 2 is in state “end”.
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] POST request for step "3"
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] startStep(“3”)
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] setMaintenanceMode(“true”)
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] configFileName /var/www/owncloud/updater/…/config/config.php
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] end of setMaintenanceMode()
2017-08-02T11:37:28+0200 7xPWGuej8Q [info] endStep(“3”)
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] request to updater
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] currentStep()
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] Step 3 is in state “end”.
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] POST request for step "4"
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] startStep(“4”)
2017-08-02T11:37:28+0200 q1iurAVeZ3 [info] createBackup()
2017-08-02T11:37:29+0200 q1iurAVeZ3 [info] end of createBackup()
2017-08-02T11:37:29+0200 q1iurAVeZ3 [info] endStep(“4”)
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] request to updater
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] currentStep()
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] Step 4 is in state “end”.
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] POST request for step "5"
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] startStep(“5”)
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] downloadUpdate()
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] getUpdateServerResponse()
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] releaseChannel: beta
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] internal version: 12.0.0.29
2017-08-02T11:37:29+0200 SE4Fvuz6bn [info] updateURL: https://updates.nextcloud.org/updater_server/?version=12x0x0x29xxxbetaxx2017-05-22T08%3A27%3A00%2B00%3A00+98e26f8b5c8b238e7f3556e900c524ce78bde95ax5x6x30
2017-08-02T11:37:30+0200 SE4Fvuz6bn [info] getUpdateServerResponse response: Array
(
[version] => 12.0.1.3
[versionstring] => Nextcloud 12.0.1 RC4
[url] => https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => YojqdYWbre2Zr9DAwFbjI2QtFdEA84C2NRWymN/MjbJkUS9oBMv9+D911vJ5UBoi
Qiyws4B4KyHMWJfKaXQlGLMbgL/nZFQh3T8u9vYhULmhkJGIa7W9tJjfUzQO+PYM
RuXtapyQ2jKSu7qCDkHVNamYLAoS7hY2sbEoqKJDgV6ZpqbUYnbQGzBODSaaz6cQ
TsSOtKKPDlQoF+b045EQni5A9YGrzmCsGrUaPQYxgvprcmTOIilvnSL48RS5T1GP
1pLqaNBltmSp58P0olBqdDMuF1k99Rq1xbQ+94upcntdnF/vzjwjfsK/+IWl7yV5
Gw3uk0kCB6RE+5bdKoyq5w==
)

2017-08-02T11:37:30+0200 SE4Fvuz6bn [info] storage location exists
2017-08-02T11:37:30+0200 SE4Fvuz6bn [info] end of downloadUpdate()
2017-08-02T11:37:30+0200 SE4Fvuz6bn [info] endStep(“5”)
2017-08-02T11:37:30+0200 WjULgAgvTp [info] request to updater
2017-08-02T11:37:30+0200 WjULgAgvTp [info] currentStep()
2017-08-02T11:37:30+0200 WjULgAgvTp [info] Step 5 is in state “end”.
2017-08-02T11:37:30+0200 WjULgAgvTp [info] POST request for step "6"
2017-08-02T11:37:30+0200 WjULgAgvTp [info] startStep(“6”)
2017-08-02T11:37:30+0200 WjULgAgvTp [info] verifyIntegrity()
2017-08-02T11:37:30+0200 WjULgAgvTp [info] getUpdateServerResponse()
2017-08-02T11:37:30+0200 WjULgAgvTp [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-08-02T11:37:30+0200 WjULgAgvTp [info] releaseChannel: beta
2017-08-02T11:37:30+0200 WjULgAgvTp [info] internal version: 12.0.0.29
2017-08-02T11:37:30+0200 WjULgAgvTp [info] updateURL: https://updates.nextcloud.org/updater_server/?version=12x0x0x29xxxbetaxx2017-05-22T08%3A27%3A00%2B00%3A00+98e26f8b5c8b238e7f3556e900c524ce78bde95ax5x6x30
2017-08-02T11:37:30+0200 WjULgAgvTp [info] getUpdateServerResponse response: Array
(
[version] => 12.0.1.3
[versionstring] => Nextcloud 12.0.1 RC4
[url] => https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => YojqdYWbre2Zr9DAwFbjI2QtFdEA84C2NRWymN/MjbJkUS9oBMv9+D911vJ5UBoi
Qiyws4B4KyHMWJfKaXQlGLMbgL/nZFQh3T8u9vYhULmhkJGIa7W9tJjfUzQO+PYM
RuXtapyQ2jKSu7qCDkHVNamYLAoS7hY2sbEoqKJDgV6ZpqbUYnbQGzBODSaaz6cQ
TsSOtKKPDlQoF+b045EQni5A9YGrzmCsGrUaPQYxgvprcmTOIilvnSL48RS5T1GP
1pLqaNBltmSp58P0olBqdDMuF1k99Rq1xbQ+94upcntdnF/vzjwjfsK/+IWl7yV5
Gw3uk0kCB6RE+5bdKoyq5w==
)

2017-08-02T11:37:30+0200 WjULgAgvTp [info] storage location: /var/opt/ocdata/data/updater-occ6zyjd53ts/downloads/
2017-08-02T11:37:31+0200 WjULgAgvTp [info] end of verifyIntegrity()
2017-08-02T11:37:31+0200 WjULgAgvTp [info] endStep(“6”)
2017-08-02T11:37:31+0200 lkqDPReK6d [info] request to updater
2017-08-02T11:37:31+0200 lkqDPReK6d [info] currentStep()
2017-08-02T11:37:31+0200 lkqDPReK6d [info] Step 6 is in state “end”.
2017-08-02T11:37:31+0200 lkqDPReK6d [info] POST request for step "7"
2017-08-02T11:37:31+0200 lkqDPReK6d [info] startStep(“7”)
2017-08-02T11:37:31+0200 lkqDPReK6d [info] extractDownload()
2017-08-02T11:37:31+0200 lkqDPReK6d [info] storage location: /var/opt/ocdata/data/updater-occ6zyjd53ts/downloads/
2017-08-02T11:37:36+0200 lkqDPReK6d [info] end of extractDownload()
2017-08-02T11:37:36+0200 lkqDPReK6d [info] endStep(“7”)
2017-08-02T11:37:36+0200 OZSTEonduz [info] request to updater
2017-08-02T11:37:36+0200 OZSTEonduz [info] currentStep()
2017-08-02T11:37:36+0200 OZSTEonduz [info] Step 7 is in state “end”.
2017-08-02T11:37:36+0200 OZSTEonduz [info] POST request for step "8"
2017-08-02T11:37:36+0200 OZSTEonduz [info] startStep(“8”)
2017-08-02T11:37:36+0200 OZSTEonduz [info] replaceEntryPoints()
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace index.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace status.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace remote.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace public.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace ocs/v1.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] replace ocs/v2.php
2017-08-02T11:37:36+0200 OZSTEonduz [info] end of replaceEntryPoints()
2017-08-02T11:37:36+0200 OZSTEonduz [info] endStep(“8”)
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] request to updater
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] currentStep()
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] Step 8 is in state “end”.
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] POST request for step "9"
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] startStep(“9”)
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] deleteOldFiles()
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] config sample exists
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] thmes README exists
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] end of deleteOldFiles()
2017-08-02T11:37:36+0200 AqSvc95tEZ [info] endStep(“9”)
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] request to updater
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] currentStep()
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] Step 9 is in state “end”.
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] POST request for step "10"
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] startStep(“10”)
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] moveNewVersionInPlace()
2017-08-02T11:37:37+0200 SZkiD9aSTg [info] storage location: /var/opt/ocdata/data/updater-occ6zyjd53ts/downloads/nextcloud/
2017-08-02T11:37:39+0200 SZkiD9aSTg [info] end of moveNewVersionInPlace()
2017-08-02T11:37:39+0200 SZkiD9aSTg [info] endStep(“10”)
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] request to updater
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] currentStep()
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] Step 10 is in state “end”.
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] POST request for step "12"
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] startStep(“12”)
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] finalize()
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] storage location: /var/opt/ocdata/data/updater-occ6zyjd53ts/downloads/nextcloud/
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] end of finalize()
2017-08-02T11:37:59+0200 DnzpEHyf7I [info] endStep(“12”)

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
‘instanceid’ => xxx,
‘passwordsalt’ => xxx,
‘secret’ => xxx.I2f’,
‘trusted_domains’ =>
array (
0 => ‘144.xxx’,
1 => ‘xxxx.com’,
),
‘datadirectory’ => ‘/var/opt/ocdata/data’,
‘overwrite.cli.url’ => ‘https://xxx.com/’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘12.0.0.29’,
‘dbname’ => xxx,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘oc_xxx,
‘dbpassword’ => xxx,
‘installed’ => true,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpsecure’ => ‘ssl’,
‘mail_from_address’ => ‘owncloud’,
‘mail_domain’ => xxxx.com’,
‘mail_smtpauth’ => 1,
‘mail_smtpauthtype’ => ‘PLAIN’,
‘mail_smtphost’ => ‘mail.your-server.de’,
‘mail_smtpport’ => ‘465’,
‘mail_smtpname’ => ‘owncloud@xxxx.com’,
‘mail_smtppassword’ => xxxx!!’,
‘forcessl’ => true,
‘app.mail.imaplog.enabled’ => true,
‘theme’ => ‘’,
‘maintenance’ => true,
‘loglevel’ => 0,
‘log_rotate_size’ => 104857600,
‘appstore.experimental.enabled’ => true,
‘trashbin_retention_obligation’ => ‘disabled’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
‘timeout’ => 0,
),
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘updatechecker’ => false,
‘htaccess.RewriteBase’ => ‘/’,
‘updater.release.channel’ => ‘beta’,
‘updater.secret’ => xx.xx/eR3mFfBgIKzMtnU/DRUyIQZtwCDt3p5G’,
);

The output of your Apache/nginx/system log in /var/log/____:
[Wed Aug 02 12:00:09.526413 2017] [:error] [pid 29445] [client 93.xxx.235:61718] PHP Fatal error: Uncaught exception ‘Doctrine\DBAL\DBALException’ with message ‘Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused’ in /var/www/owncloud/lib/private/DB/Connection.php:61\nStack trace:\n#0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/owncloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\ in /var/www/owncloud/lib/private/DB/Connection.php on line 61


php -m
[PHP Modules]
calendar
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
libxml
mbstring
mcrypt
mysqlnd
openssl
pcntl
pcre
PDO
Phar
posix
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

php -i |grep pdo
/etc/php/7.0/cli/conf.d/10-pdo.ini,

Anyone who can help?

Could you check if the database is running and doesn’t show any error messages in its log files?
Did you change any configurations to your database (different port, socket) or to your firewall?

No other ideas so far.

Hi,

the database works:
—schnipp—

| localhost | rainloop | *C14930257A0FF7EA88C20B3572C4F0B9CC3BE2AF | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | | | N | N |
±----------------------------±-----------------±------------------------------------------±------------±------------±------------±------------±------------±----------±------------±--------------±-------------±----------±-----------±----------------±-----------±-----------±-------------±-----------±----------------------±-----------------±-------------±----------------±-----------------±-----------------±---------------±--------------------±-------------------±-----------------±-----------±-------------±-----------------------±---------±-----------±------------±-------------±--------------±------------±----------------±---------------------±-------±----------------------±-----------------±--------+
15 rows in set (0.00 sec)

MariaDB [mysql]>

—schnapp—

There was no change made to any other configuration except the update to 12 RC4.

PHP 7 is not enabled. I checked the Database, the grants and tested access using a quick PDO-check script. This works fine.
Still, when calling OCC I get this:

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /var/www/owncloud/lib/private/DB/Connection.php:61
Stack trace:
#0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()

Here you can find my phpinfo: https://maute.eu/wp-content/uploads/phpinfo.pdf

Hope you have another hint for me.

I don’t understand what you are actually doing. So you want to use PHP7 but it is not enabled? You should definitely configure it correctly and enable it.
Or was this part of an error message that PHP7 is not enabled? Probably PHP7 is required by NC 12.x

So if not done, please install and configure PHP7. Also check the system logs for php errors (journalctl)

I guess I understood now:
Since 12RC4 there is no chance to install Nextcloud on PHP version under 7 whereas the updater does not check the prerequisites, right?
I cannot run 7.x on this server due to other services.

Is there any chance to make the latest Nextcloud using PHP 5.6?

I see. No you don’t necessarily need to install PHP7. I was just thinking that you tried.

From the NC 12 installation guide:

Supported Platforms

Server: Linux (Debian 7, SUSE Linux Enterprise Server 11 SP3 & 12, Red Hat Enterprise Linux/CentOS 6.5 and 7 (7 is 64-bit only), Ubuntu 14.04 LTS, 16.04 LTS)
Web server: Apache 2 (mod_php, php-fpm) or Nginx (php-fpm)
Databases: MySQL/MariaDB 5.5+; PostgreSQL; Oracle 11g (currently only possible if you contact us <https://nextcloud.com/enterprise> as part of a subscription)
PHP 5.6 + required

So PHP 5.6 is totally fine.
But why did you write:

PHP version (eg, 5.6): PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )

php -i |grep pdo
/etc/php/7.0/cli/conf.d/10-pdo.ini,

?

Both read PHP 7. When you actually don’t want to use PHP 7 please don’t configure PHP7 then. Make sure the database module (pdo) is loaded in the PHP5 config.

Hello Schmu,

thanks for your help. You put me on the right path.

After the upgrade to Debian 9.1 my server was a mixture out of PHP 7 and 5.6. So I deleted the link for php in /etc/alternatives and added one which links now to /usr/bin/php5.

Solved. So thanks for putting me on the right track.
Best wishes,
Frank.

You’re very welcome :slight_smile:
I’m glad you got it working now.