Can't login if I downgrade php version

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (14.0.4)_

I also tried this with Nextcloud 15.0 clean installation.

Operating system and version Archlinux):
Apache or nginx version (Apache 2.4.37)
:
PHP version (7.1.25): (normally I use php 7.3.0)

The issue you are facing:

I am trying to run nextcloud with php 7.1.25, as I can’t install
mail app with php 7.3.0. But as soon as I switch to php 7.1.25,
I can’t log in to nextcloud.

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Install nextcloud with php 7.3 and create accounts.
  2. Downgrade php to 7.1.25
  3. Go to login page

The output of your Nextcloud log in Admin > Logging:
Unfortunately with the clean installation of Nextcoud 15, trying to download the log
leads to internal server error. With Nextcloud 14 existing installation, there are too many things which might be “sensible” and I have to remove, as well as lots of lines with “no cache entry found…” Anyway if this becomes crucial, I will figure a way to post it.

PASTE HERE


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:
Curiously nothing (except authorization errors for syncing clients) appears in error log
with the fresh install. The only line that appears after downgrading php version, in the case
of fresh install is

192.168.1.1 - - [29/Dec/2018:09:36:54 +0100] "GET /index.php/csrftoken HTTP/1.1" 403 1099

I recently ran into this issue too when php was upgraded to 7.4 on Arch Linux, which is not supported by nextcloud 17. I decided to install php72 in addition from aur and use this version until php 7.4 is supported. Unfortunately it broke the login of all accounts as you’ve already indicated.
Seems like I have only two choices to fix this.

  1. stay on php 7.2 and reset the passwords from all accounts
  2. or switch back to php 7.4 and change the code in the php file/s which prevent nextcloud from running with php 7.4

Quite annoying…
Hopefully we find a better solution for this.