Nextcloud version (eg, 20.0.5): 25
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.54
PHP version (eg, 7.4): 8.1
The issue you are facing:
After fresh install with of Nextcloud 25 with Apache 2.4.54/php8.1 executing the cron.php via cronjob isn’t possible anymore. Some general php-setting in Apache seems to state php 8.2 which I actually avoided when installing php.
After executing
php -f /var/www/nextcloud/cron.php
the error message is:
“This version of Nextcloud is not compatible with PHP>=8.2. You are currently running 8.2.0.%”
Any ideas how I can tell the system that php8.1 is still available and supposed to be used for that job?
Is this the first time you’ve seen this error? (Y/N): Y
This executes the PHP CLI application with the given php file (crom.php).
However you have not explicitly choosen which php version to use, hence asks the system to use the PHP version of its choice (PHP is an alias which the system translates to the newest installed PHP CLI version on the host system). Usualy this is the newest version installed.
I think I had tried that and got an error message which I can’t remember. I retried it and now I get the following feedback:
Cannot load Zend OPcache - it was already loaded
ArgumentCountError: Too few arguments to function OCA\MediaDC\BackgroundJob\CollectorCleanupJob::construct(), 0 passed in /var/www/nextcloud/lib/private/BackgroundJob/JobList.php on line 304 and exactly 2 expected in /var/www/nextcloud/apps/mediadc/lib/BackgroundJob/CollectorCleanupJob.php:41
Stack trace: #0 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(304): OCA\MediaDC\BackgroundJob\CollectorCleanupJob->
construct() #1 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(243): OC\BackgroundJob\JobList->buildJob() #2 /var/www/nextcloud/cron.php(145): OC\BackgroundJob\JobList->getNext() #3 {main}