I’m trying to update my synolgy web station from PHP 5.6 to PHP 7.0, but I get errors. The web interface seems to work ok, but calling cron.php gives this result:
The command executed by synology’s “task planner” is
su -s /bin/sh -c “/usr/local/bin/php70 -f /var/services/web/nextcloud/cron.php” http
the result is
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /volume1/web/nextcloud/lib/private/DB/Connection.php:64
Stack trace: #0 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect() #1 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /volume1/web/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Ob in /volume1/web/nextcloud/lib/private/DB/Connection.php on line 64
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /volume1/web/nextcloud/lib/private/DB/Connection.php:64
Stack trace: #0 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect() #1 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /volume1/web/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /volume1/web/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Ob in /volume1/web/nextcloud/lib/private/DB/Connection.php on line 64
for
su -s /bin/sh -c “/usr/local/bin/php56 -f /var/services/web/nextcloud/cron.php” http
I get no result → everything works. So it seems something is missing in my php 7.0 setup - what could that be?
This totally helped me - saved me several days of WTF - and had not seen anything descriving this behavior in any documentation anywhere. And I have installed Nextcloud on at least 4 different desktop systems, ARMHF, and AWS - thanks so much!
Sorry about my English. I’m not sure about the MySQL library, I think that was why I had to edit the extension_dir option in the resulting php.ini. Also make sure, that the options extension = mysqli.so and extension = pdo_mysql.so are present. This entries come form the file /usr/syno/etc/packages/WebStation/php_profile/SOME-UUID/conf.d/user_settings.ini in step 2 of creating the custom php.ini file - warning: you need to replace SOME-UUID with a value that works for your installation!
I checked the options in php.ini, but they were correct. But then I tried the other user in php_profile (there are two in my system) and that did the trick!
And then I compared the two user_settings.ini and found that one was missing the extension=mysql.so, so I didn’t look thoroughly when I tried to spot the error…
Now I still get a warning PHP Warning: PHP Startup: No such handler: DBA_DEFAULT in Unknown on line 0
but then it says Maintenance mode disabled
so that seems to be only a warning.
Give that you are pretty handy with Nextcloud and if I understand correctly you have a Synology. Do you know of any resource to get the NextcloudPi docker image/container running on a 918+ - I can’t seem to get the right set of configuration with the docker run, and freeing up or configuring the 80/443 port without conflicting with the system and its really upsetting me.
The nginx config from Synology is hard to work with and I had to fight to get Nextcloud that was originally installed as ownCloud app form the community repo to work on 80 and 443 for IPv4 and IPv6. To be honest I didn’t test if IPv6 still works - it is very brittle beginning with my ADSL-Modem needing reboots if the firewall starts to block IPv6 again.
Basically uses docker to create a virtual IP address from its internal DHCP server and a LAMP stack is created, tada! No messing around with nginx, or files, or UI.
The first thing I did with Synology was chroot it and install my normal stack, this should be the 3rd thing I do, instead of wasting time figuring out what goes where with the system.