Recently upgraded NextCloud from 14.0.6 to 15.0.2 which is on hosted website. Also upgraded hosted php version from 7.0 to 7.2. Next day received error from email regarding executed (hosted) cronjob:
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database
Searching for this error gave lot of possible solution. Unfortunately none of the possible solutions worked. Until I realized I didn’t adjust the path in my cronjob, which still included …/php70/…
Changing the path from …/php70/… to …/php72/… solved the error.
Nextcloud version: 15.0.2:
Operating system and version: Hosted website on Apache
PHP version: 7.2