[solved] Migration to RPI Bookworm (64) with PHP 8.2

Hello NextClouders,

I have a problem that there is a lot to read about - too much for me to get clarity.

My plan is to migrate a Nextcloud (25.0.8) from a RaspberryOS Bullseye (32bit) to a RaspberryOS Bookworm (64bit) on a new machine.
For this I moved the database and all files /var/www//nextcloud to the new box.
Now I get “This version of Nextcloud is not compatible with PHP>=8.2. You are currently running 8.2.7.”

Threads about this issue are plentiful, mostly related to container environments or other prerequisites.

I think I found that switching to the testing repo, i.e. to NC26.x would help me.
Since the GUI is not running, I would have to do this from the CLI.
One can ‘bend’ the version test in /lib/versioncheck.php:
if (PHP_VERSION_ID >= 80200)
change to
if (PHP_VERSION_ID >= 80300)
Then the updater runs and wants to upgrade to 25.0.9, but fails at ‘occ upgrade’ with:
An unhandled exception has been thrown:
RedisException: Connection refused in /var/www//nextcloud/lib/private/RedisFactory.php:137
Looks like I need to fix redis…

Is there any point in following this plan?
How do I set the repository to 26.x without GUI ?

Thanks and greetings,

Boris

Puh, I was able to crack the nut. As is usually the case, it’s easy afterwards:
I had to install the redis-server, then the ‘trick’ with the version check helped and I am now on 25.0.9 and it runs well as far as I can tell so far.

Maybe someone can still add how one could have changed the repository from the CLI.

Otherwise the request is ‘closed’.

Regards.

Boris

PS: Thanks to all who are working on this for this great piece of software!!!

What you did probably was fine (albeit not “supported”). Another approach is to use the Sury PHP PPA (which is also what folks use to bump to newer PHP versions while sticking with older LTS releases of Debian and Ubuntu). If you take that approach you can even have more than one version of PHP on hand to do whatever you need.

When you say “repository” are you referring to the Nextcloud release channel?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#updater-release-channel

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.