This version of Nextcloud is not compatible with > PHP 8.2. You are currently running 8.2.6

I’m using Unraid 6.11.5 and linuxserver/nextcloud docker container.

But today after I update my Nextcloud, I get this error: This version of Nextcloud is not compatible with > PHP 8.2 You are currently running 8.2.6

I have no idea how to fix it. Anyone can help?

Thank you very much.

1 Like

What version of NC were in on and are you trying to upgrade to?

It sounds almost like you somehow ended up with an up-to-date container, but an old NC version that doesn’t support PHP 8.2. Although that error message doesn’t sound quite right either - I suspect it said >=

Did you upgrade the container image first like linuxserver.io recommends:

Actually that approach sounds like it could have issues if one upgrades to the latest container image with a new enough PHP before the installed version of NC supports it…

Yep, the LS folks have an issue open on this. I suspect something got overlooked either in their documented process or some other change in their image… You may want to go add your experience:

My question is meant absolute serious: why would one use linuxserver/nextcloud - LinuxServer.io if there is an official image?
Is there any advantage I cannot see?

Best regards,
Jesko

Because I followed the steps from space invader years ago when I set it up.

In other words, no reason, just coïncidence…

So, what is the solution? for unraid user. using the command will not work from the container. I need to update using the Web UI but i can’t access it. I tried maintenance mode but still i can’t get to the Web UI. how do I downgrade my version and prevent auto update? thanks

root@622cfd8db6c8:/# updater.phar
Nextcloud Updater - version: v25.0.1-4-g5649b58

Current version is 25.0.3.

Update to Nextcloud 25.0.7 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.7.zip
Open changelog ↗

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
This version of Nextcloud is not compatible with PHP>=8.2.<br/>You are currently running 8.2.6.
Keep maintenance mode active? [y/N] y
Maintenance mode kept active
root@622cfd8db6c8:/# 
  1. Change Repository to lscr.io/linuxserver/nextcloud:26.0.2-ls246
  2. Start Nextcloud
  3. Update via WEB GUI to 26.0x
  4. Remove version Tag :26.0.2-ls246 from step 1
    Done
5 Likes

Thanks for the reply; I use Nextcloud on Unraid I usually update with the Web UI. I cant access it now!
what command should I use to change the repository to lscr.io/linuxserver/nextcloud:26.0.2-ls246).

Thank you

Edit the docker. And change the repo to the one listed above. Click apply and it should then update. You’ll likely have to then turn off maintenance mode off before you’ll be able to get back into the web ui after this though.

2 Likes

Thank you, this solved the issue for me!

I still updated my NC through CLI, because updating through web GUI times out due to how much data I have.
from unraid forums, the commands I used:

cd /config/www/nextcloud/updater/

root@bd32ce1bcd66:/config/www/nextcloud/updater# sudo -u abc php updater.phar

I hadn’t updated NC in months, so I had to run the updater.phar command twice.

1 Like

Kman great work! Thanks for helping the community :kissing_smiling_eyes:

1 Like

Thanks very much! This worked brilliantly. I had to update twice via terminal instead of web GUI for it to update from 24 to 25 to 26. Then removed the tag and it worked.

You are a docker/file/server saver

:pray:

Many thanks

Thanks for fixing my Nextcloud guys.
I rarely logon to the web console at all, so I also rarely update it.

Hi! I’m experiencing the same issue but I’m using the official nextcloud docker image instead. Has anyone had the same issue with the official docker image?

I’d like some info on this, I got my NC to work again by doing the specific build (246) as stated and was able to update from 24 to 25, but for some reason it will not update to 26, I have to keep battling timeouts and refreshes, then when it gets to the “Extracting” it will go red with the “Parsing Response Failed” then when I click “retry update” it will then just go red without the dropdown, and when I refresh the page it’ll just start from the beginning again.

is the command string you provided just updating the docker container in Unraid, or is it updating the actual docker IN the container?

edit: I finally got it to work/update, I had to use the containers console to command the updates and they finally took, the web ui kept erroring out (red highlights) and having to refresh then restarting the update without actually finishing it.

Hello there, thank you for this, it worked for me and now I don’t have the php error anymore.
But now I have this issue instead:

I’ve had my NC previously setup and working (with some other problems), but it was all fine…

None of the solutions here worked for me, so I wanted to share what solved this problem fairly quickly for me.

  1. I installed php8.1
  2. i made sure that I installed all the modules needed (apt install php8.1-{bcmath,xml,fpm,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi} )
  3. then I ran “update-alternatives -all” paying attention to set the following to 8.1
    Selection Path Priority Status

0 /usr/bin/phar8.2 82 auto mode
1 /usr/bin/phar7.4 74 manual mode

  • 2 /usr/bin/phar8.1 81 manual mode
    3 /usr/bin/phar8.2 82 manual mode

Selection Path Priority Status

0 /usr/bin/php8.2 82 auto mode
1 /usr/bin/php7.4 74 manual mode

  • 2 /usr/bin/php8.1 81 manual mode
    3 /usr/bin/php8.2 82 manual mode

Selection Path Priority Status

0 /usr/bin/php-cgi8.2 82 auto mode

  • 1 /usr/bin/php-cgi8.1 81 manual mode
    2 /usr/bin/php-cgi8.2 82 manual mode

Selection Path Priority Status

0 /usr/lib/cgi-bin/php8.2 82 auto mode

  • 1 /usr/lib/cgi-bin/php8.1 81 manual mode
    2 /usr/lib/cgi-bin/php8.2 82 manual mode
    Selection Path Priority Status

0 /run/php/php8.2-fpm.sock 82 auto mode

  • 1 /run/php/php8.1-fpm.sock 81 manual mode
    2 /run/php/php8.2-fpm.sock 82 manual mode

then I doublechecked by running “a2dismod” to make sure that there were no other versions of php modules loaded other than 8.1 that needed to be disabled.
our choices are: access_compat alias auth_basic auth_digest authn_core authn_file authnz_ldap authz_core authz_host authz_user autoindex cgi cgid deflate dir env filter headers http2 ldap log_debug log_forensic maxminddb mime mime_magic mpm_prefork negotiation php8.1 proxy proxy_fcgi proxy_http proxy_http2 reqtimeout rewrite setenvif socache_shmcb ssl status userdir vhost_alias
Which module(s) do you want to disable (wildcards ok)?

Amazingly the error message still showed up until…
I ran this:
systemctl disable php7.4fpm.service
systemctl start php8.1fpm.service
systemctl restart apache2.service
viola!
Hope this helps.

1 Like