Hi all,
I’ve just noticed some troubles that arose after upgrading the OS from Debian Jessie to Stretch. During this upgrade MySQL was replaced by MariaDB.
Although Nextcloud is running without any (obvious) issues, I found in the “Admin” tab the error message “Last job execution ran 3 days ago. Something seems wrong.” -> cron.php has not been executed by cron.
Manually executing the script did not update the message.
Manually executing the following command produced pages of error messges:
root@caldav:~# sudo -u www-data php /var/www/owncloud/occ user:lastseen barbara
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
The error seems to say that the php MySQL driver is not installed.
The upgrade from jessie to stretch also changes the default PHP version from 5.6 to 7.0. Please check with dpkg -l php* which versions of PHP you have installed. If there are multiple, look at ls -al /etc/alternatives/php* to see which ones are the default.
Then you should make sure that:
the database driver is installed for the PHP version you use. If you now use php7, then the package php7.0-mysql is needed.
the webserver and cron job use the same PHP version
Hi all,
to warm up my previous thread: Now my server in using two different versions: The cron job was updated to php7.0 whereas the apache continues to use 5.
Can anybody help me on how to upgrade the version used by apache also?
Shall I use ‘update-alternatives’? Or is the PHP version set in an apache config file?
Both. You should run update-alternatives and depending on your apache config file (both global and virtual hosts) you might have to change other settings. It also depends on whether you use the apache-php module, cgi, fcgi or php-fpm. There are many ways to make apache and php talk to each other
Besides that, if you do not need the old PHP for anything else, I would suggest you just uninstall all php5 packages.