I have latest NextCloudPi version, but dated PHP version

Nextcloud version: 25.0.1.1
Operating system and version: Debian GNU/Linux 11. 5.15.32-v8+ (aarch64)
Apache or nginx version: Apache/2.4.56 (Debian)
PHP version (eg, 7.4): PHP 7.4.33

The issue you are facing:
I’m running NextCloudPi v1.52.0.

When I go to update to Nextcloud 26, using the NCP admin I get this message:
[ nc-update-nextcloud ] (Thu May 11 21:25:57 BST 2023) We need to upgrade PHP. This process cannot be performed from the web UI. Please use 'ncp-config' from the terminal (via SSH or direct access) to update Nextcloud instead. Future updates can again be run from the web UI

When I navigate ncp-config, I don’t see any option to update PHP. I understand that Nextcloud 26 requires an updated version of PHP.

Futher, I see that a past update to NCP included a PHP upgrade to 8.1. My machine was running at this time, so I’m confused why I don’t have that PHP update.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Attempt to update using nc-update-nextcloud
  2. See error message
  3. Confirm that I’m running NextCloudPi v1.52.0 with PHP 7.4.33

Thank you!!

Sorry i do not use NextCloudPi . But you must differ between PHP in the web and PHP in the command line. Maybe there is the problem.

Can you list all php packages?
dpkg -l |grep php

Unfortunately I do not know if NextcloudPi has any special features when updating packages. Normally you get PHP 8.1 only when switching from Debian 11 (Bullseye) to Debian 12 (Bookworm). But I don’t know if NextcloudPi might include third party sources to allow updating PHP packages already on Debian 11 (Bullseye).

When you run ncp-config, look for the option to upgrade Nextcloud not PHP.

The process of upgrading to the newer version of Nextcloud is what triggers the PHP upgrade to the appropriate version.

Think about it this way: the NCP version you’re running supports upgrading to v26 NC and, in turn, will upgrade to PHP 8.1 when required (i.e. when you upgrade to v26 NC).

Thank you! I tried this and got a negative response.

Running nc-update-nextcloud
Current   Nextcloud version 25.0.1.1
Available Nextcloud version 26.0.1
Download Nextcloud 26.0.1...
Back up current instance...
check free space...
Maintenance mode enabled
backup database...
backup files...
backup /var/www/nextcloud-bkp_20230512_1683928341.tar.gz generated
Maintenance mode disabled
Storing backup at '/var/www/nextcloud-bkp_20230512_1683928341-25.0.1.1.tar.gz'...
Install Nextcloud 26.0.1...
Fix permissions...
Upgrade...
This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.Abort
Clean up...
Rolling back to backup /var/www/nextcloud-bkp_20230512_1683928341-25.0.1.1.tar.gz...
check free space...
extracting backup file /var/www/nextcloud-bkp_20230512_1683928341-25.0.1.1.tar.gz...

Thanks! Here is what I’m seeing

dpkg -l |grep php
ii  php-common                           2:76                             all          Common files for PHP packages
ii  php-igbinary                         3.2.1+2.0.8-2                    arm64        igbinary PHP serializer
ii  php-redis                            5.3.2+4.3.0-2+deb11u1            arm64        PHP extension for interfacing with Redis
ii  php7.4                               7.4.33-1+deb11u3                 all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.4-bcmath                        7.4.33-1+deb11u3                 arm64        Bcmath module for PHP
ii  php7.4-bz2                           7.4.33-1+deb11u3                 arm64        bzip2 module for PHP
ii  php7.4-cli                           7.4.33-1+deb11u3                 arm64        command-line interpreter for the PHP scripting language
ii  php7.4-common                        7.4.33-1+deb11u3                 arm64        documentation, examples and common module for PHP
ii  php7.4-curl                          7.4.33-1+deb11u3                 arm64        CURL module for PHP
ii  php7.4-fpm                           7.4.33-1+deb11u3                 arm64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php7.4-gd                            7.4.33-1+deb11u3                 arm64        GD module for PHP
ii  php7.4-gmp                           7.4.33-1+deb11u3                 arm64        GMP module for PHP
ii  php7.4-intl                          7.4.33-1+deb11u3                 arm64        Internationalisation module for PHP
ii  php7.4-json                          7.4.33-1+deb11u3                 arm64        JSON module for PHP
ii  php7.4-ldap                          7.4.33-1+deb11u3                 arm64        LDAP module for PHP
ii  php7.4-mbstring                      7.4.33-1+deb11u3                 arm64        MBSTRING module for PHP
ii  php7.4-mysql                         7.4.33-1+deb11u3                 arm64        MySQL module for PHP
ii  php7.4-opcache                       7.4.33-1+deb11u3                 arm64        Zend OpCache module for PHP
ii  php7.4-readline                      7.4.33-1+deb11u3                 arm64        readline module for PHP
ii  php7.4-xml                           7.4.33-1+deb11u3                 arm64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php7.4-zip                           7.4.33-1+deb11u3                 arm64        Zip module for PHP

The instructions from @jtr are correct. However, if that doesn’t work, try to update to version 25.0.6 first (using ncp-config) and see if that successfully installs PHP 8.1.

In the meantime I’ll test the updater with NC26 and see if it needs fixing

3 Likes

Yes, this did the trick. Thank you!

When I updated to 25.0.6 using ncp-config is also updated the PHP version. I was then able to updated to NC26.

2 Likes