Nextcloud Web ui doesn't login on Windows clients

Hi,

I got a strange problem after updating nextcloud server since a few versions: I am not able to login via the web ui login prompt, even though the credentials are correct. After entering the correct credentials, it doesn’t show me the dashboard, instead it redirects back to login with no error.

But on my Linux client it works just perfect. The Linux client is in the same LAN as the Windows Client.

I tried it in Opera and Firefox, but no success. Currently only if you got an old login token on Windows machines, it works there (logged in since the update to Nextcloud server 20+, I was very long on PHP 7.4, since openSUSE Leap still supports it in their official repos).

Any help to this would be great. Because of that issue, I can’t start nextcloud-desktop-client on Windows, because it can’t get the new login token.

Thanks in advice :slight_smile:

As you say you still run your server on php 7.4 it might be really outdated now. defitely you must update to a supported version ASAP. it could happen this runs old TLS which was deprecated in Windows or maybe root CA which was revoked shortly… hard to know without any usefull logs and insights…

I would first try to login using incognito tab, if this fails as well look at f12/dev tools - likely you will see the reason.

I’ve tested it again, also on my Linux machines. It turns out that every new login doesn’t work, only old still valid tokens are working. But I can login on browsers where I had a successful login before, currently only on Opera at one of my Linux client machines. In browser console on such non-working browsers, there’s no error logged in console tab.

The server is a Nextcloud Hub 7 28.0.4 server instance (single instance) running on openSUSE Leap with PHP 8.1 with PHP-FPM handler on nginx as a configured vhost.

I’ve found the problem:
[24-Jun-2024 08:07:56 UTC] {"reqId":"nOSqTG6gaBJUcrTO3aMx","level":3,"time":"June 24, 2024 08:07:56","remoteAddr":"0.0.0.0","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/admin/","message":"session_start(): Failed to read session data: files (path: /var/lib/php7) at /srv/www/vhosts/domain.de/sync.domain.de/lib/private/Session/Internal.php#213","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.0git (Nextcloud, opensuse-tumbleweed-6.9.1-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.4.1","data":{"app":"PHP"}}

So for some strange reason, this and remote.php file pointed the session save path to the old PHP7 directory. However, to fix this I changed the ownership of the base folder /var/lib/php7 back to nginx:nginx and made it also group-writable to avoid other problems. I need to rework some day my nginx configs, but for now, this solves the issue.
I found the issue, since it was strange that I wasn’t able to open the system log file using Nextcloud’s web ui. So I digged deeper into php logs and finally faced the issue.

1 Like

I think the real mistake is that you didn’t clean up the old PHP 7.4 environment correctly. Unfortunately, I am not familiar with SUSE. But you should remove the package remnants of PHP 7.4. Maybe then nobody can log in anymore. But then you only have one problem.

Maybe post
sudo zypper search -i php
sudo zypper se -si |grep php

Maybe delete package
sudo zypper remove --clean-deps NAME

Maybe delete also configurations:
sudo rpm -e --noscripts NAME

1 Like

Probably it hasn’t cleaned up everything automatically. That usually happens automatically with installing the updated / upgraded version, because package distributor takes care of that with using after-install scripts in rpm package itself. However, here are the outputs:

The first command:

zypper search -i php
S  | Name            | Summary                                                | Type
---+-----------------+--------------------------------------------------------+------
i+ | php81           | Interpreter for the PHP scripting language version 8   | Paket
i+ | php81-APCu      | APCu - APC User Cache                                  | Paket
i+ | php81-bcmath    | "Binary Calculator" extension for PHP                  | Paket
i  | php81-cli       | Interpreter for the PHP scripting language version 8   | Paket
i  | php81-ctype     | Character class extension for PHP                      | Paket
i+ | php81-curl      | PHP libcurl integration                                | Paket
i  | php81-dom       | Document Object Model extension for PHP                | Paket
i+ | php81-exif      | EXIF metadata extensions for PHP                       | Paket
i+ | php81-fastcgi   | FastCGI PHP Module                                     | Paket
i+ | php81-fileinfo  | File identification extension for PHP                  | Paket
i+ | php81-fpm       | FastCGI Process Manager PHP Module                     | Paket
i+ | php81-gd        | GD Graphics Library extension for PHP                  | Paket
i+ | php81-gettext   | Native language support for PHP                        | Paket
i+ | php81-gmp       | Bignum extension for PHP                               | Paket
i  | php81-iconv     | Character set conversion functions for PHP             | Paket
i+ | php81-imagick   | Wrapper to the ImageMagick library                     | Paket
i+ | php81-intl      | ICU integration for PHP                                | Paket
i+ | php81-mbstring  | Multibyte string functions for PHP                     | Paket
i+ | php81-mysql     | MySQL database client for PHP                          | Paket
i  | php81-openssl   | OpenSSL integration for PHP                            | Paket
i+ | php81-pcntl     | Process Control extension for PHP                      | Paket
i  | php81-pdo       | PHP Data Objects extension for PHP                     | Paket
i+ | php81-phar      | PHP Archive extension for PHP                          | Paket
i+ | php81-posix     | POSIX functions for PHP                                | Paket
i+ | php81-redis     | API for communicating with Redis servers               | Paket
i+ | php81-sodium    | Cryptographic Extension Based on Libsodium             | Paket
i  | php81-sqlite    | SQLite database client for PHP                         | Paket
i+ | php81-sysvsem   | SysV Semaphore support for PHP                         | Paket
i  | php81-tokenizer | Extension module to access Zend Engine's PHP tokenizer | Paket
i  | php81-xmlreader | Streaming XML reader extension for PHP                 | Paket
i  | php81-xmlwriter | Streaming-based XML writer extension for PHP           | Paket
i+ | php81-zip       | ZIP archive support for PHP                            | Paket
i+ | php81-zlib      | Zlib compression support for PHP                       | Paket

The second search command:

zypper se -si |grep php
i+ | php81                                      | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-APCu                                 | Paket   | 5.1.22-bp155.2.3.1                        | x86_64 | Update repository of openSUSE Backports
i+ | php81-bcmath                               | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-cli                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-ctype                                | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-curl                                 | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-dom                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-exif                                 | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-fastcgi                              | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-fileinfo                             | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-fpm                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-gd                                   | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-gettext                              | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-gmp                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-iconv                                | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-imagick                              | Paket   | 3.7.0-bp155.4.3.1                         | x86_64 | Update repository of openSUSE Backports
i+ | php81-intl                                 | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-mbstring                             | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-mysql                                | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-openssl                              | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-pcntl                                | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-pdo                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-phar                                 | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-posix                                | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-redis                                | Paket   | 5.3.7-bp155.2.3.1                         | x86_64 | Update repository of openSUSE Backports
i+ | php81-sodium                               | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-sqlite                               | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-sysvsem                              | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-tokenizer                            | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-xmlreader                            | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i  | php81-xmlwriter                            | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-zip                                  | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports
i+ | php81-zlib                                 | Paket   | 8.1.24-bp155.5.1                          | x86_64 | Update repository of openSUSE Backports

I’ll ask that in an openSUSE group if need to do something manually when upgrading from PHP 7.4 to 8.1 and let you know the results here.

I would have expected something from PHP 7.4 in the list, since you are still using it. Perhaps there is also a corresponding configuration somewhere. Maybe you can search for it and post the corresponding entries.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.