Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] This version of Nextcloud is not compatible with PHP>=8.2. #313

Closed
1 task done
ps-kl opened this issue Jun 1, 2023 · 44 comments
Closed
1 task done

[BUG] This version of Nextcloud is not compatible with PHP>=8.2. #313

ps-kl opened this issue Jun 1, 2023 · 44 comments

Comments

@ps-kl
Copy link

ps-kl commented Jun 1, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After Update commit c07466d yesterday Nextcloud only shows:
This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.6.

I did the steps from pinned Issue but it changed nothing. Going back to 26.0.2-ls246 works for me. But with Change 26.0.2-ls247 and php 8.2 it won't work anymore for me even if I update the install as explained.

Expected Behavior

No response

Steps To Reproduce

Use latest Image

Environment

- OS:Unraid 
- How docker service was installed:

CPU architecture

x86-64

Docker creation

Unraid Community Apps

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

using keys found in /config/keys
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default.bak
/config/nginx/site-confs/default.conf.bak
[custom-init] No custom files found, skipping...
[ls.io-init] done.
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Jun 1, 2023

What version is your nextcloud? You need to keep updating as long as it lets you. It does incremental updates.

@ps-kl
Copy link
Author

ps-kl commented Jun 1, 2023

25.0.7 and the support for php 8.2 comes with 26 so I have to change to 26.0.2.

docker exec -it nextcloud updater.phar
Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.7.

No update available.

Nothing to do.

seems from 25 to 26 is not a auto update at this point. I did go back to 26.0.2-ls246 and updated via settings UI and go back to latest image works. But I guess 25 is still long term stable release from nextcloud and it won't work with php 8.2

@tstrausbaugh-dev
Copy link

Just to chime in. I am having the same issue. Like paskalll I run the manual update from the server "docker exec -it nextcloud updater.phar" and the latest it takes me to is 25.0.7. It seems 26 was released but the updater is not seeing it? Is the easiest way to fix this just to go back to an older docker image?

@Biepa
Copy link

Biepa commented Jun 1, 2023

Going back to "26.0.2-ls246" like @paskalll mentioned atleast let me use nextcloud again.

@ps-kl
Copy link
Author

ps-kl commented Jun 1, 2023

  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

@An4cl3t0
Copy link

An4cl3t0 commented Jun 1, 2023

Same for me, " This version of Nextcloud is not compatible with PHP>=8.2."

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

@An4cl3t0 then read the comments above you. It's already well documented what to do.

@kvn1351
Copy link

kvn1351 commented Jun 1, 2023

If only they had a "stable" tag :/

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

Or just don't use latest and pin to an actual version tag. If you just run with using :latest - you're always running the risk. https://www.linuxserver.io/blog/2018-04-22-the-dangers-of-pulling-latest

The reason so many people are experiencing this issue is due to

  1. running automatic updates (watchtower etc)
  2. not updating nextcloud within the container.

Our nextcloud has always been like this and it's documented in our readme.

@peterge1998
Copy link

peterge1998 commented Jun 1, 2023

Just add :26.0.2-ls246 Nextcloud starts Update via WEB GUI to 26.0x Remove version tag from image Done

Maintenance mode is active after starting with this tag...

Edit:
Fixed it by docker exec -it nextcloud updater.phar

I am coninuing to use latest & watchtower.

@jarbelix
Copy link

jarbelix commented Jun 1, 2023

Same for me, " This version of Nextcloud is not compatible with PHP>=8.2."

Sema for me: https://nextcloud.tiozaodolinux.com/

This environment is a test environment. I'll leave it until the fix comes out.

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

There is no "fix" - you need to roll back to a previous image tag, run updater.phar to get it up to the latest version that tag supports then switch back.

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

Just add :26.0.2-ls246 Nextcloud starts Update via WEB GUI to 26.0x Remove version tag from image Done

Maintenance mode is active after starting with this tag...

Switching tag won't make nextcloud go into maintenance mode, as our containers don't run any nextcloud commands on start up. It would've been due to a command you ran previously before you switched tag.

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

And to prove a point, my personal instance of nextcloud is on Linuxserver.io version:- 24.0.12-ls238 Build-date:- 2023-04-20T11:12:06+02:00 and it's picking up v26 update:
image

@j0nnymoe
Copy link
Member

j0nnymoe commented Jun 1, 2023

To confirm these instructions are still relevant: #288
image

@say-no-to-deer-pressure
Copy link

I also ran into this issue. Setting the container version to :26.0.2-ls246 and running updater.phar afterwards solved it.

@joshaspinall
Copy link

+1 for me too. Updated and running without issue following the instructions above.

@kman1898
Copy link

kman1898 commented Jun 2, 2023

updater

But how do I switch back? I cannot get into the gui and have no place to change the tag. Currently on 25.0.7

@aptalca
Copy link
Member

aptalca commented Jun 2, 2023

Unraid forums and their docker faq have plenty of info on managing docker images and tags and various other aspects of their docker gui management system.

@kman1898
Copy link

kman1898 commented Jun 2, 2023

Unraid forums and their docker faq have plenty of info on managing docker images and tags and various other aspects of their docker gui management system.

Solved. Thanks

@say-no-to-deer-pressure
Copy link

I am sorry to ask this but how do i fix this? i have looked at the instructions

  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

how do i change the repository? and from now on i should update using the nextcloud gui instead of using he unraid docker management? i am sorry for the hand holding that is needed.

How are you running Docker? Installed on Ubuntu, Unraid etc

@Nicon4454
Copy link

Nicon4454 commented Jun 4, 2023 via email

@FudiHub
Copy link

FudiHub commented Jun 4, 2023

the instructions above fixed it. Thanks

@mindtrust80
Copy link

Hello,

i had the same issue und changed Repo to lscr.io/linuxserver/nextcloud:26.0.2-ls246
Now i got this problem:
grafik

I tried several times without any change.

Would be nice, if someone could help me, thanks.

@nemchik
Copy link
Member

nemchik commented Jun 5, 2023

Hello,

i had the same issue und changed Repo to lscr.io/linuxserver/nextcloud:26.0.2-ls246 Now i got this problem: grafik

I tried several times without any change.

Would be nice, if someone could help me, thanks.

DISCLAIMER FOR FUTURE READERS:
DO NOT ATTEMPT TO DO THIS BASED ON HAVING SIMILAR SYMPTOMS! OPEN A NEW ISSUE AND WE WILL INSTRUCT IF THIS METHOD IS NECESSARY!

  1. stop your nextcloud container
  2. backup your /config volume (and if possible, your /data volume) and make a backup of your nextcloud database (could be sqlite, mariadb, or pgsql)
  3. re-read step 2! I cannot stress enough that skipping step 2 can leave you in a completely unrecoverable state!
  4. delete /config/www/nextcloud/index.php
  5. set your container image tag to latest, ex: lscr.io/linuxserver/nextcloud:latest
  6. start the container
  7. watch the container logs
  8. if there are any issues in the log, come here and post the log output!
  9. if there are no issues in the log, bash (terminal) into the container and run updater.phar, otherwise post the log with issues here
  10. if there are no issues still, run occ update, otherwise post the log with issues here

With any luck you won't have any issues, and this will reinstall the latest available version of nextcloud.

@mindtrust80
Copy link

Much thanks Eric, you are my hero :)

@olaxe
Copy link

olaxe commented Jun 6, 2023

This procedure has worked for me. Careful to read the word repeatedly as there is multiple updates

Execute docker exec -it nextcloud updater.phar repeatedly until there are no more updates

@sausje
Copy link

sausje commented Jun 6, 2023

Using the updater.phar resulted in error after extracting about the version.php missing?!?! Literally just ran the command and that's it

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting ...PHP Warning: require(/config/www/nextcloud/updater/../version.php): Failed to open stream: No such file or directory in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 676
PHP Fatal error: Uncaught Error: Failed opening required '/config/www/nextcloud/updater/../version.php' (include_path='.:/usr/share/php82') in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php:676
Stack trace:
#0 phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php(713): NC\Updater\Updater->getVersionByVersionFile()
#1 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(372): NC\Updater\Updater->extractDownload()
#2 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(233): NC\Updater\UpdateCommand->executeStep()
#3 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(256): NC\Updater\UpdateCommand->execute()
#4 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(820): Symfony\Component\Console\Command\Command->run()
#5 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(187): Symfony\Component\Console\Application->doRunCommand()
#6 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(118): Symfony\Component\Console\Application->doRun()
#7 phar:///config/www/nextcloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#8 /config/www/nextcloud/updater/updater.phar(14): require('...')
#9 {main}
thrown in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 676

@elforesto

This comment was marked as off-topic.

@Beryllium30
Copy link

Beryllium30 commented Jun 10, 2023

Hey

I am a bit confused and not sure how to progress :D

I basically changed the tag in Unraid to:
lscr.io/linuxserver/nextcloud:26.0.2-ls246

Nextcloud works again then and I wanted to update to the 26 version.
If I go to the docker terminal and use: updater.phar i get the following message:

`Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.4.

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 ↗`

Why can't I update to the 26 version? Super confused also about the version discrepancy from the tags.
Would appreciate any help!

BR
Berry

@j0nnymoe
Copy link
Member

You have to run the updater multiple times, You can't just jump to the latest version.

@Beryllium30
Copy link

Is that supported with the docker container?

but why is there a version missmatch?

@j0nnymoe
Copy link
Member

Yes it's supported within our container, it's the update process we recommend in our readme.

The tags are for what version is included for a new install. For exisiting installs, you need to make sure you're on a newer tag for the correct dependencies.

@nemchik
Copy link
Member

nemchik commented Jun 10, 2023

The container doesn't update nextcloud automatically when you updated the container image. Updates to nextcloud are done manually.

I am in the process of building nextcloud into the container. Builds that should work are ready, but need more testing than just me. I haven't asked for user testing at this point because testing requires a well planned backup and restore procedure, which is something we advise everyone have in general. If testing is successful, this build could eventually replace our current builds, and it would replace the current manual upgrade process. Tldr: the test builds could break your install in an unrecoverable way.

@Wigsinator
Copy link

Wigsinator commented Jun 11, 2023

If I attempt to run the updater when on tag 26.0.2 and 26.0.2-247, I receive this: The updater loops infinitely like so, and upgrading to version 26 is impossible. And occ upgrade can't be run after the update.

Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.7.

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 ↗

However, if I try to run the upgrader on tag 26.0.2-ls246 like people are recommending, I get told:

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /config/www/nextcloud/lib/private/DB/Connection.php:139

I'm using MariaDB as my database. What should I attempt from here?

Edit: Resolved, My MariaDB instance was unavailable due to an incorrect shutdown, and was updated before rebooting. This caused it to fail to launch properly.

@doreks
Copy link

doreks commented Jun 20, 2023

hi @j0nnymoe

same issue here:

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

and here the log after try to upgrade manually:

`root@d2b6296cfc12:/#updater.phar
Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.7.

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

Continue 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.
You are currently running 8.2.7.`

any way to fix it and can work normally?

thanks for the support!

@nemchik
Copy link
Member

nemchik commented Jun 20, 2023

#288 has all the instructions needed to fix this issue.

@GeneralUser-NonDev
Copy link

FINALLY got the update to 26.x.x to work, being new to all this stuff i had to first figure out WHERE to try running these commands. I had to open the containers console (terminal) and run the command "updater.phar" there, no clue where to use "docker exec -it nextcloud updater.phar" as it didn't work in the containers terminal/console window (maybe Unraid terminal window?!). after it finally taking 26 i removed the version tag on the repo line and it works correctly, currently trying to update to 27.x.x (and beyond) the same way, hope it works (knock on wood).

too bad there isn't a way to have the internals of the container to auto-update, or is there and I'm missing something?

@nemchik
Copy link
Member

nemchik commented Jun 20, 2023

too bad there isn't a way to have the internals of the container to auto-update, or is there and I'm missing something?

It's being worked on #317

@nemchik nemchik closed this as completed Jun 20, 2023
@jkrauss82
Copy link

jkrauss82 commented Aug 15, 2023

Don't know why this issue is closed, it should not be.

Just ran into the issue, too. We are on stable channel, nextcloud version 25.0.10, non-docker installation. We do not want to switch to a beta channel for production software.

Documentation says recommended php is 8.2. We use apache2 and php-fpm.

Request reopening and fixing this problem or update the documentation to be informative about actually supported environment.

@j0nnymoe
Copy link
Member

You're on a non-docker installation. This support thread isn't relevant for you.

@jkrauss82
Copy link

Understood, nevermind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests