Upgrade 25 -> 26 and PHP Upgrade 7.4 -> 8.x

Nextcloud Server version: 25.0.13
Operating System (Ubuntu_20.04): Linux 5.4.0-204-generic x86_64
CPU: AMD Ryzen 7 PRO 3700 8-Core Processor (16 cores)
Memory: 62.79 GB
Web server and version: Apache/2.4.41 (Ubuntu)
PHP version: PHP 7.4.33 (cli)
update-alternatives --config php:
Selection Path Priority Status

0 /usr/bin/php8.4 84 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
    4 /usr/bin/php8.2 82 manual mode
    5 /usr/bin/php8.4 84 manual mode

Database type: mysql
Version: 10.3.39

I am running nextcloud verion 25.0.13, this is very old version which I need to go to 26 or more. And no matter what channel I use, it does not offer me NC26, maybe because of the php version. I have tried installing 8.0 and 8.1 (they both are listed in “update-alternatives --config php” (see above). But as soon as I change to a later version of php 8.x both cli and apache I get then from the web UI the following error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

What might I have been missing or I need to wait maybe a little bit more until it will appear in web UI updater the following 26 version?

Hi @Xhulio24

You should update your ubuntu, since 20.04 (focal) is end of LTS in 4 months. So acting yesterday was too late!

since you are on Ubuntu, you should use the → php-updater ← script for the switching of the php-version, which is possible until the eol of focal.

h.t.h.


Much and good luck,
ernolf

Hello @ernolf thank you very much for your response:

I upgraded my instance to the following:
image

1 Like

Then you can use the → php-updater ← script now for the switching to the required php-version.

Here you can see the php-version for what nextcloud version is required:


ernolf

Hello @ernolf thank you very much for the script. I run it and then set up 8.1 see below:

I did also:
sudo a2dismod php7.4 php8.0
sudo a2enmod php8.1
sudo systemctl restart apache2

Somehow the internal error has disappeard but now I have:

Maintenance mode

This xxxxx.com instance is currently in maintenance mode, which may take a while. This page will refresh itself when the instance is available again.

Contact your system administrator if this message persists or appeared unexpectedly.

Those steps are done by the script. No need to repeat them.

Run

sudo -u www-data -E php -f /var/www/nextcloud/occ maintenance:mode --off

h.t.h.


Much and good luck,
ernolf

Hello Ernolf thank you very much for your response I did that coulnd’t realised what was that but yeah I should have changed the maintaniance mode. Thank you very much I think php updater was a life changer now I am to NC 26 and going to 27

1 Like

Thank you, thats what I made it for; to enable simple php-switching.

Consider to contribute:

php-updater --contribute

:heart:

Frohe Weihnachten!


ernolf

Thanks just did that!

1 Like