This version of Nextcloud is not compatible with > PHP 7.3

This seems to happen again and again and now it happens for PHP 7.4 (from Arch Linux) as well:

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?

1 Like

You are absolutely right. The developers are currently working on the PHP 7.4 support.

currently working on the PHP 7.4 support.

For Nextcloud 18: Add php7.4 support by rullzer · Pull Request #18064 · nextcloud/server · GitHub

Is there no way for arch user to run multiple php versions? PHP 7.3 is not eol.

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.

3 Likes

@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 =
1 Like

Yes we had this already in 2017: https://help.nextcloud.com/t/php-error-narrowing-occurred-during-type-inference/24010/17

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

Which Nextcloud package did you install on Arch?

https://www.archlinux.org/packages/?name=nextcloud

Then maybe ask https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/nextcloud#n1 to specify a closer PHP version.
Our requirements can be found in lib/versioncheck.php

1 Like

oh okay ! I’ll have a look there, thank you!

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.

Here is the issue for archlinux: FS#64689 : [nextcloud] PHP 7.4 upgrade breaks nextcloud

This helped me in the meantime:
> If you modifiy /usr/share/webapps/nextcloud/lib/versioncheck.php

    replacing
    if (version_compare(PHP_VERSION, '7.4.0') !== -1) {
    with
    if (version_compare(PHP_VERSION, '7.5.0') !== -1) {
    can you progress any further?

Just to say I too have this problem:
This version of Nextcloud is not compatible with > PHP 7.3. You are currently running 7.4.1.

I am on Nextcloud 17.0.2.

It seems to be stopping CRON jobs from running.

I edited versioncheck.php to allow versions up to 7.5.0 but this didn’t seem to make any difference.
Any suggestions please?
Thanks.

So, how can I get my nextcloud running again. Im stuck with…

This version of Nextcloud is not compatible with > PHP 7.3.
You are currently running 7.4.1.

Die the same allowed php check up to 7.5.0 and tried to run
Php occ upgrade after that without success.

Cant get my Cloud instance working with the override fix above.

My ubuntu 18.04.3 is automatically upgraded on php 7.4.1 at the Moment.

OK find another way to solve the Problem.

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 :slight_smile:

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.

1 Like

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

1 Like

This didn’t work for us as we didn’t have the fpm module. Instead, solution was

apt install libapache2-mod-php7.3
a2dismod php7.4
a2enmod php7.3
systemctl restart apache2