Several issues with NCP update and PHP update

NextcloudPi (NCP) is designed as an all-in-one solution. NCP instances are not supposed to run other services, nor be manually updated. Rather, you should rely on Debian’s unattended-upgrades package/feature to automatically install security patches. In other words, do not run apt upgrade or apt-get upgrade.

Minor (feature, not patch) updates to software are tested/vetted by the NCP team to work properly with NCP before being released via a new NCP version. Updates to NCP are received through its nc-update script, though you should really enable its automated counterpart, nc-autoupdate-ncp, instead.

All of this (and more) is mentioned in the NCP documentation, on the page Staying up to date:

nc-autoupdate-ncp

Automatically apply NextCloudPi updates (i.e. v1.12.4). A cron job checks for updates once a day.

nc-update

Update NextCloudPi. If you do not enable nc-autoupdate-ncp, you will need to manually run this once a week.

unattended-upgrades

Automatic installation of security updates. Keep your OS and cloud safe. NCP users do not need to run apt manually. Should you decide to do so anyway keep in mind there are various issues that can occur, one of those being a mismatch of the PHP versions of all the modules installed, > specifically the php-fpm module. Often the answer is simply to install the missing module and reboot, otherwise look to the forum for help.

Since your Debian upgrade moved you to PHP 8, you should either:

(a) downgrade PHP and check your Apache config is still pointing to the right PHP-FPM server; or

(b) upgrade your PHP modules (since your currently installed ones all seem to be for PHP 7.4) and update your Apache config to point to the new PHP-FPM server.

In my opinion, option (a) is the simpler of the two. You should be able to do this with this chain of commands:

sudo apt update \
&& sudo apt install -y php7.4-fpm \
&& sudo apt remove -y php8.1-fpm \
&& sudo apt-mark auto php-fpm \
&& sudo apt autoremove -y

Save/copy the output of that, as it may be useful for troubleshooting, but a reboot should get your server back up and running after you run that. If it’s still not working, it’ll most likely be an Apache misconfiguration at that point, but let’s check what PHP-related packages you have installed with dpkg -l | grep php and go from there.

1 Like