Unexpected upgrade from PHP7.4 to PHP8.0 and now I can't log into Nextcloud 20

Running Nextcloud 20 on Ubuntu 18.04 Server VM. Everything has been working well but I ran a Ubuntu update and forgot to take a snapshot prior just in case… Well, of course, PHP was upgraded from 7.4 to 8.0 and I wasn’t even able to reach my Nextcloud login page. After some searching, I was able to get PHP7.4 going again and now I can reach my login page. However, when I enter my login credentials, nothing happens. It doesn’t go to the 2FA page, it simply refreshes and wants me to enter my credentials again. Like it’s not even talking to the mysql database. I tried to reset my password by email just for kicks and it gave me this message: “Couldn’t send reset email. Please contact your administrator.”

I feel it is close to working, probably a missing PHP module. Any thoughts? Thanks.

Maybe you are using the wrong php.ini file?

To which ubuntu version have you upgraded? For nextcloud please only use LTS versions like 18.04 LTS, 20.04 LTS, 22.04 LTS, …

Normally you only get versoin 7.4 in Ubuntu 20.04 LTS.
Please post

uname -a
cat /etc/issue
dpkg -l |grep php

For the correct packages you also can read this. Hopefully yo do not have install Ubuntu 20.10 or 21.04.

Sorry for the delay in replying, for some reason over the last couple days the forum was giving me trouble to respond. Today it’s working again.

Thanks for the replies but because I couldn’t interact on the forum, I had to work on other possible solutions. My local nextcloud backs up nightly using rdiff-backup so I had the latest database, data, and nextcloud folder. Also, as luck would have it, I had saved a complete copy of the VM in January. So I restored the old working VM and then restored the current database, data file, and nextcloud files so all the data was up to date, just running on older versions of nextcloud and Ubuntu 18.04. Took a snapshot at this point since it was working!

Then I trial and errored the upgrades. I purged PHP8.0 and no issues resulted, Nextcloud ran fine. Running apt-get dist-upgrade from this point gave me the original Apache error screen I experienced (not even the Nextcloud login screen). So I went back to the prior snapshot and ran apt-get upgrade. No problems seen. Then I ran dist-upgrade and again no problems, both Nextcloud and Ubuntu 18.04 are at their latest versions and everything is working without issue.

Thanks for responding and trying to help. I still don’t know what caused my original problem but it seems that running upgrade, then dist-upgrade was required. Running dist-upgrade by itself broke something. But everything is working now, thank God for backups and for the admin manual that had all the steps needed to do the restore and post-restore occ commands.

1 Like