Upgrading with the newest PHP

I’ll start off by saying I know this problem is of my own making for delaying updates.

I upgraded my operating system which included an upgrade to PHP 8.2 from 7.4 which I was running before. My current Nextcloud installation is not compatible with PHP 8.2 so I need to upgrade. However, the upgrade script also fails with the same error message about the PHP version. Older PHP versions are not available from my package repositories, and I’d like to avoid mixing repos just for this. Is there a way I can still properly upgrade my Nextcloud installation?

I’m running Debian bookworm.

I decided to edit the version check code and simply comment out the offending check, and occ now works. However, it claims I am already on the latest Nextcloud version, which is clearly not the case. What can I do here?

Okay, reading the docs more carefully was a good move. I found the updater.phar script and that is working smoothly. Pardon my noobishness. I think this is going to work out.

1 Like

Life would be so easy, if everybody would fill out the support template

Which version?

You should use → the dpa from Ondřej Surý ← . He is the maintainer of the official php packages and you’l get the php7* as well for bookworm with his repos.

what exactly did you comment out?

How does “it” claim?

Did you try to update with the web-updater or with the commandline updater script:

(assuming you installed the php7.4-cli package):

# change this to your need:
NC_DIR=/var/www/nextcloud
sudo -u www-data  -E /usr/bin/php7.4  -f "$NC_DIR/updater/updater.phar"

If the next version you need to update to does not support 8.2 either, then you will not get shown any new nextcloud at all. Then you must temporarily downgrade your php and do the upgrade step by step.
After you have done that little journey, you will have learned a lot. It is not that complicated if you once understood the principle!

Much luck,
ernolf

I see that my answer overlapped with your message.
I’m glad you solved it!

Much luck,
ernolf

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