This version of Nextcloud is not compatible with > PHP 7.3.
You are currently running 7.4.0
The quick “fix” was to adjust lib/versioncheck.php somewhat to override the check and the server installation appears to work now (albeit with plenty of PHP deprecated warnings in the logs).
I guess this cannot be fixed until #18146 (“Test apps against PHP 7.4”) has been resolved, right?
PHP7.4 has been released just 3 days ago. If an distro ships it as only possibility already now, it’s a distro issue not a Nextcloud one. Good to have support early but it should be never expected before next release after official PHP release.
@MichaIng That is the entire principle of rolling release distros - ship the package updates as soon as they are available.
@kesselb From what I can tell, no, as on Arch Linux, the packages are php, php-fpm, etc. etc., and not php7.3-fpm and so on, like on other distros. To get any php version other than the latest, you’ll have to install them manually or via the AUR (e.g. php71 is currently in the AUR), which I wouldn’t recommend. Even if it’s not EoL, it’s not the latest anymore, and Arch, as a rolling release distro, always has the latest version.
Alternatively, you can downgrade with pacman, but that will probably be a lot of effort
I agree, that’s what rolling releases do, and that also means that responsibility is shifted to the admin. Upgrades want to be reviewed, for instance (OTOH, the dependency on the nextcloud package should be more restrictive, if that is being used).
Until 18 is available you can set the PHP packages to be ignored from being updated. Mind, that you might end up with a vulnerable 7.3 since there is no support for it anymore.
Modify “IgorePkg” in /etc/pacman.conf to include “PHP*”, for instance:
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg = php*
#IgnoreGroup =
cd /var/cache/pacman/pkg #hopefully you ve not cleaned your pkg cache!!!
pacman -U php-fpm-7.3.12-1-x86_64.pkg.tar.xz php-7.3.12-1-x86_64.pkg.tar.xz php-gd-7.3.12-1-x86_64.pkg.tar.xz php-intl-7.3.12-1-x86_64.pkg.tar.xz php-imagick-3.4.4-4-x86_64.pkg.tar.xz php-imap-7.3.12-1-x86_64.pkg.tar.xz php-memcached-3.1.4-1-x86_64.pkg.tar.xz php-apache-7.3.12-1-x86_64.pkg.tar.xz php-apcu-5.1.18-1-x86_64.pkg.tar.xz
Good hint, unfortunately it did not work for me.
After downgrading all PHP packages Nextcloud was not reachable anymore.
I guess that the downgrading has some dependencies to the Apache server or NC itself.
I run nextcloud 17.0.1 on Ubuntu 18.04.3 LTS. After an update & upgrade of the server I now have php 7.4.1 and I get the same message each time the cronjob for the background jobs runs.
The problem was that php-cli ran the newest version but the server still runs version 7.2.25.
I changed the line in the cronjob to run php7.2 (i.e.: */5 * * * * php7.2 -f (path to cron.php)/nextcloud/cron.php) and no more complaints.
Check out what PHP Version is in use by command in terminal php -v
then change it by :
// change terminal (cli) version (7.4 to 7.3)
sudo update-alternatives --set php /usr/bin/php7.3
Check again! System must now operate the php7.3 again by using /usr/bin/PHP
Then php occ upgrade ist working well again.
Hope it works for others in the same way
So you don’t have to uninstall whole php7.4 and maybe destroy any dependencies during that action.
By going back to 7.3 systemwide your cron jobs for nextcloud should work again without changes at the crontab.
If you want to switch back to php7.x you could do later by command above. Replace 7.3 by your running PHP version.
Use updates-alternatives to select 7.3 again on debian e.g.: update-alternatives --config php update-alternatives --config php-cgi service php7.0-fpm restart service apache2 restart