PHP Path Problem - This version of Nextcloud is not compatible with > PHP

Hi, I just wanted to tell, that I got a problem today while updating my nextcloud application.

When I update with the shell like this:

sudo -u php-fpm-user php updater.phar

I got the message:

This version of Nextcloud is not compatible with > PHP 7.3.<br/>You are currently running 7.4.2.

This is because my system has php7.4.2 but my nextcloud domain is running under php-fpm with php7.1, so I had to put this in the command to update:

sudo -u php-fpm-user /usr/bin/php7.1 updater.phar

After the update I had to cancel the upgrade because it also wanted to upgrade with “just” php, so I had to leave the upgrade and had to manually put this in shell to complete the upgrade:

sudo -u php-fpm-user /usr/bin/php7.1 occ upgrade

Maybe I did it totally wrong or I had to symlink my php but maybe it’s someting someone else is running into, so maybe my post here is helping someone.

I think you’ve forgotten to mention which Nextcloud version you tried to update to which new version. The Nextcloud documentation shows detailed information about the supported PHP versions:

https://docs.nextcloud.com/server/18/admin_manual/installation/system_requirements.html#server

Hi thx for the reply

The PHP Version doesnt matter with php-fpm and multiple php versions.

As I said, the updater is taking with “just php” the server global version, not the version the nextcloud is running under php-fpm.

So I had no real problem, but nextcloud is not remembering the php-fpm path to the php version after the update and before.

You can find several tweaks to get it up and running here: