Internal server error after update [nextcloudpi]

I tried to read all your topic, I’m not sure you have exactly the same trouble than I had yesterday.

Mine was that Nextcloud and Redis were using 2 different versions of PHP (PHP 7.4 for NC and PHP8.0 for Redis).

I realised it cause Nextcloud was working back if I commented the lines about cache :

config.php

#ā€˜memcache.local’ => ā€˜\OC\Memcache\Redis’,
#ā€˜memcache.locking’ => ā€˜\OC\Memcache\Redis’,
#ā€˜redis’ =>
#array (
#ā€˜host’ => ā€˜/var/run/redis/redis.sock’,
#ā€˜port’ => 0,
#ā€˜timeout’ => 0.0,
#ā€˜password’ => ā€˜XXXXX’,
#),

You’re using PHP7.3. I suggest you to upgrade your PHP version to 8. You’re maybe not obliged to do it now but it will be necessary in the future, this is why I’m advising you to do it. If it’s not the problem, you will know PHP version was not the solution.

I can shortly describe you the procedure:

  • Install PHP8.0 and all dependencies required by Nextcloud (you can list your actual modules for know what to install with : dpkg -l | grep php )
  • Activate PHP8.0 and disable old version
  • Reconfigure PHP.ini in /etc/php/apache2/ for the ā€œmemory_limitā€
  • Test with ā€œphp -vā€ if the good version is running

I’ve tried to summary this :

Try to script

apt-get update
apt-get upgrade

sudo add-apt-repository ppa:ondrej/php # The repo for PHP8.0
sudo apt-get update

sudo apt install libapache2-mod-php8.0
sudo apt install php8.0-gd php8.0-mysql php8.0-curl php8.0-mbstring php8.0-intl
sudo apt install php8.0-gmp php8.0-bcmath php-imagick php8.0-xml php8.0-zip

sudo a2enmod php8.0 #Load the module for Apache
sudo a2dismod php7.3 #Unload the old version
sudo systemctl restart apache2

I’m not a pro, but I think there is not big mistakes in these instructions. Maybe someone can approve it.

One more time, this solution worked for it was a PHP problem version.
I hope it will help you