Updating php debian-nc

Nextcloud version (eg, 20.0.5): 24.0.5
Operating system and version : Debian 11.5
Apache or nginx version : 2..4.54
PHP version (eg, 7.4): 8.1

The issue you are facing:

Steps to replicate it:

  1. /index.php/settings/admin/serverinfo give 8.0.23
  2. php -v give 8.1.10
  3. update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
  0            /usr/bin/php8.1   81        auto mode
  1            /usr/bin/php7.4   74        manual mode
  2            /usr/bin/php8.0   80        manual mode
* 3            /usr/bin/php8.1   81        manual mode

a2enconf php8.1-. done, Conf php8.1-. already enabled of course.

I guess ( other modules too ) i am in php 8.1.10 but NC thinks otherwise…

apt-get purge php8.0 not used yet… others services dependencies. Expurging them is on my to do list.

Do i miss anything ?


Why do you think it is necessary to use a different version of PHP than the PHP 7.4 version shipped with Debian 11?

PHP 7.4 is still supported in Debian Bullseye (default) and in Nextcloud
Debian -- Details of package php in bullseye

documentation requirements Nextcloud

Ubuntu 20.04 LTS (recommended)
Red Hat Enterprise Linux 8 (recommended)
Debian 10 (Buster)
    8.0 (recommended)

Maybe someone can delete recommended. And hey, why not use PHP 8.0? 8.1 is also not recommended. Or do you just want the latest? Why don’t you also use Debian Bookworm 12 / Testing or Debian Sid?

Perhaps some hope for better performance?

Currently 7.4 is supported, sometimes the Nextcloud team drops support not long after official support ends (PHP: Supported Versions). NC 25 will still support php7.4 and before NC 25 runs out of support, Debian Bookworm will probably be released.

I personally would also stay with the default debian packages.

1 Like

You can have several versions of PHP installed. PHP -v will print the newest version installed, but you have to configure Apache2 specifically to use the desired version. If you use PHP-FPM, you also needs to make sure that you use the 8.1 version, and THAT config is using php 8.1. Based on your report, I guess you are using PHP-FPM and the PHP-FPM engine is NOT switched to 8.1. When you do switch, you also has to restart the PHP-FPM engine.

“systemctl restart php8.0-fpm” for me as I am not (yet) using 8.1 until fully officially supported by NC. But use “systemctl restart php8.1-fpm” if 8.1 is what you are using.

@devnull It’s a testbed server. I need to think about having php8.1 because i have dependencies to meet for our server prod. We have several services and apps. I am starting testing and migration plan ( my customers productions server will be updated by january )

@tflidd Of course, performances are one of my goals, but also consistency between apps. No more hassle playing with three configurations. Staying with the default packages is not possible because php official security support end in less than 2 month now: PHP: Supported Versions
Nextcloud dev’s are dropping the ball here ! php8.2 is already in RC2.
My company value security, and want php7.4 out of the scope by january. Definitly.
As nextcloud support 8.0, i am safe, but if 8.1 works too, i am daring to step in. And Debian will officially support 8.1 very soon.

@Kerasit Planning to look to it today or tomorrow. Thanks for the clue, will try it asap.

Anyway, thank to all.

Ok. I then agree with @Kerasit . You must not only upgrade php-cli but also php-fpm and libapache2-mod-php.

php-cli -> php7.4-cli (Bullseye) vs. php8.1-cli (Bockworm)

libapache2-mod-php -> libapache2-mod-php7.4 (Bullseye) vs. libapache2-mod-php8.1 (Bockworm)

php-fpm -> php7.4-fpm (Bullseye) vs. php8.1-fpm (Bockworm)

just saw your message before leaving…

All three are updated… I will try to test it tonight, tomorrow… Have to leave quickly, azur down for one of my customer …


Sorry team, but i had an opportunity to join a new company ( Spie-ICS ) i couldn’t refuse … so my time from last week to maybee the next three month is pretty tight…

… php8.1 will wait and my partner will take care of my customer… a new adventure for me.