Nextcloud Stopped Working - PHP 8.0.25


Recommended Posts

A few years ago I followed SpaceInvaderOne vids on setting up Nextcloud.  Now getting this error when firing up Nextcloud now:

 

This version of Nextcloud is not compatible with > PHP 7.4.
You are currently running 8.0.25.

 

Docker repository is = linuxserver/nextcloud

 

When loading up updater.phar, I'm still on version 20.0.14 and that's the latest available to download.  The latest Nextcloud should be 24 or 25?

 

Current version is 20.0.14.

Update to Nextcloud 20.0.14 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-20.0.14.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] 

 

Ideas on how to fix this (upgrade) without scrapping the entire Nextcloud install and reinstalling with latest docker?  I saw SpaceInvaderOne has a new guide using Swag instead of letsencrypt, so wondering if I should just start over.

 

Thanks,

Russ

Link to comment

Hey @russdyer77,

 

It took some google-fu, but in the end this issue comes down to an incompatibility with Nextcloud and the versions/config the docker container has. What I did to solve was downgrade the docker container and then run some Nextcould commands to upgrade some Nextcould apps that were causing issue.

 

I went to UnRaid UI > Docker > Click Nextcould Icon > Edit and change the Repository from 'linuxserver/nextcloud:latest' to 'linuxserver/nextcloud:25.0.2'. Note: my updater.phar also said 20.0.x even though the version installed was 25.0.3.

 

Then went into the UI Terminal for UnRaid and ran to upgrade Nextcloud plugins:

docker exec -it nextcloud occ maintenance:mode --on
docker exec -it nextcloud occ upgrade
docker exec -it nextcloud occ maintenance:mode --off

 

  • Thanks 1
Link to comment

You should check out the support thread for the container you use, there have been many people with that issue. 

The LSIO container doesn't update nextcloud on its own, you have to do that manually regularly. Since you now have a NC version that's too old for the support files in the container you need to downgrade the container so that nextcloud runs again, update nextcloud, then you can update the container again as mentioned above and in the thread.

Edited by Kilrah
Link to comment
  • 2 weeks later...
  • 2 weeks later...

Thank you @startsomewhere & @g1an7

I was able to solve the issue with your help by switching back from 

lscr.io/linuxserver/nextcloud:latest
to
lscr.io/linuxserver/nextcloud:25.0.2

image.png.ed6c0e88b5f2a986f63ccfc941077903.png

After booting up, nexcloud was in maintenance mode and I could apply the ooc upgrade command to upgrade all plugins.

 

image.png.1067a798e7cf96b6a1ec8c97afbbd77b.png

 

As you can see, without switching back to nextcloud:25.0.2 I was not able to get into maintenance mode before, cause of the 

"This version of Nextcloud is not compatible with > PHP 8.0," Error Message

 

Thank you very much for sharing this solution.

 

Link to comment
  • 2 months later...
On 3/25/2023 at 10:27 AM, Asgard said:

Thank you @startsomewhere & @g1an7

I was able to solve the issue with your help by switching back from 

lscr.io/linuxserver/nextcloud:latest
to
lscr.io/linuxserver/nextcloud:25.0.2

image.png.ed6c0e88b5f2a986f63ccfc941077903.png

After booting up, nexcloud was in maintenance mode and I could apply the ooc upgrade command to upgrade all plugins.

 

image.png.1067a798e7cf96b6a1ec8c97afbbd77b.png

 

As you can see, without switching back to nextcloud:25.0.2 I was not able to get into maintenance mode before, cause of the 

"This version of Nextcloud is not compatible with > PHP 8.0," Error Message

 

Thank you very much for sharing this solution.

 

Thanks that solved it for me ;)

Link to comment

These solutions are extremely confusing!!!!!

First there was a recommendation to follow: https://github.com/linuxserver/docker-nextcloud/issues/288

This recommendation did NOT work because the person forgot to state that MAINTENANCE MODE MUST be turned off. (And the person failed to state how to do that)

 

Then I followed subsequent recommendations and changed docker container to lscr.io/linuxserver/nextcloud:25.0.2

Then, I disabled MAINTENANCE MODE.

 

So now things work

 

Question:

(1) Where EXACTLY in nextcloud user interface do you DISABLE auto-updates?

(2) What now? Eeveryone will be stuck using "lscr.io/linuxserver/nextcloud:25.0.2" and we can NEVER AGAIN upgrade to a newer Nextcloud vesion?  In nextcloud GUI->Administration->Overview I see under "Update" section following: "A new version is available: Nextcloud 26.0.2"....What now? Should I "Open Updater" and update, or do nothing??? Should I chang docker image to something eslese BEFORE update or not?

 

Thx

Edited by emod
  • Upvote 1
Link to comment

Yeah this is all confusing. I follow all these instructions and now I keep getting this and my nextcloud doesn't work.

 

root@unraid:~# docker exec -it nextcloud occ maintenance:mode --off
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /config/www/nextcloud/lib/private/DB/Connection.php:139
Stack trace:
#0 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /config/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /config/www/nextcloud/lib/private/AppConfig.php(419): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /config/www/nextcloud/lib/private/AppConfig.php(184): OC\AppConfig->loadConfigValues()
#7 /config/www/nextcloud/lib/private/AppConfig.php(375): OC\AppConfig->getApps()
#8 /config/www/nextcloud/lib/private/legacy/OC_App.php(967): OC\AppConfig->getValues()
#9 /config/www/nextcloud/lib/private/Server.php(725): OC_App::getAppVersions()
#10 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(163): OC\Server->OC\{closure}()
#11 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(130): Pimple\Container->offsetGet()
#13 /config/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#14 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query()
#15 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(185): OC\AppFramework\Utility\SimpleContainer->get()
#16 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(163): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(130): Pimple\Container->offsetGet()
#19 /config/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#20 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query()
#21 /config/www/nextcloud/lib/private/Server.php(1121): OC\AppFramework\Utility\SimpleContainer->get()
#22 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(163): OC\Server->OC\{closure}()
#23 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(130): Pimple\Container->offsetGet()
#25 /config/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#26 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query()
#27 /config/www/nextcloud/lib/private/Server.php(2072): OC\AppFramework\Utility\SimpleContainer->get()
#28 /config/www/nextcloud/lib/private/Files/View.php(117): OC\Server->getLockingProvider()
#29 /config/www/nextcloud/lib/private/Server.php(462): OC\Files\View->__construct()
#30 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(163): OC\Server->OC\{closure}()
#31 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(130): Pimple\Container->offsetGet()
#33 /config/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#34 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query()
#35 /config/www/nextcloud/lib/private/Server.php(1474): OC\AppFramework\Utility\SimpleContainer->get()
#36 /config/www/nextcloud/lib/base.php(617): OC\Server->boot()
#37 /config/www/nextcloud/lib/base.php(1145): OC::init()
#38 /config/www/nextcloud/console.php(48): require_once('...')
#39 /config/www/nextcloud/occ(11): require_once('...')
#40 {main}root@unraid:~# 

 

Link to comment
  • 5 months later...

I found I had this same reported issue today (29 Nov 2023)

 

- Additional info from 25 June 2023 -

- Upgrading from the Admin Web UI is no longer supported: https://info.linuxserver.io/issues/2023-06-25-nextcloud/

 

This is how I got back to running just perfectly (based on the above info).


1. Edit the 'nextcloud' config via the Unraid UI (change "Repository" to "lscr.io/linuxserver/nextcloud:25.0.2"...

'Save' and this will restart the container on image 25.0.2

 

2. Did as described at the beginning of this thread by @g1an7

On 2/23/2023 at 4:48 AM, g1an7 said:

Then went into the UI Terminal for UnRaid and ran to upgrade Nextcloud plugins:

docker exec -it nextcloud occ maintenance:mode --on
docker exec -it nextcloud occ upgrade
docker exec -it nextcloud occ maintenance:mode --off

 

3. Edit the 'nextcloud' config via the Unraid UI (change "Repository" back to "lscr.io/linuxserver/nextcloud"...

'Save' and this will restart the container on the most current image (as of today that is 27.1.4)

 

4. Watch the log files of the nextcloud container...
-----Start Output------

-

-

Migrating legacy install (this can take a while) ...)
Initializing nextcloud 27.1.4.1 (this can take a while) ...
Upgrading nextcloud from 26.0.1.1 ...

-

-

Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Initializing finished

-

-

/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[ls.io-init] done.

-----End Output------
 

And now all is good again for me!
Thanks to all contributing above.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.