Suddenly unable to login/HTTP 500 error

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.0.16
  • Operating system and version (e.g., Ubuntu 24.04):
    • Docker container from hub.docker.com
  • Web server and version (e.g, Apache 2.4.25):
    • in Docker container
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx/1.29.6
  • PHP version (e.g, 8.3):
    • 8.4.19
  • Is this the first time you’ve seen this error? (Yes / No):
    • no
  • When did this problem seem to first start?
    • over night
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker container from hub.docker.com
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

I upgraded my long-running Nextcloud instance from version 32 to version 33 yesterday and everything worked fine at first. This morning however I woke up to a bunch of error messages and found that I could no longer log in to the instance.

Log lines produced using `occ log:tail`, formatted for readability:

TypeError: strtolower(): Argument #1 ($string) must be of type string, string given at lib/private/Config/UserConfig.php line 688

0. lib/private/Config/UserConfig.php line 688

  strtolower("false")

1. apps/user_ldap/lib/User/DeletedUsersIndex.php line 88

  OC\Config\UserConfig->getValueBool("***redacted***", "user_ldap", "isDeleted")

2. apps/user_ldap/lib/User_LDAP.php line 631

  OCA\User_LDAP\User\DeletedUsersIndex->isUserMarked("***redacted***")                                                                                                                                         
3. <<closure>>

  OCA\User_LDAP\User_LDAP->isUserEnabled("***redacted***", Closure {})                                                                                                                                         
4. apps/user_ldap/lib/User_Proxy.php line 67

As is evident from the logs, I use LDAP as my user backend.

Importantly, I was able to create a local user on the command line (`occ user:add`), and I can log in to the instance all right, no problems here.

It seems that a boolean value is provided to the `strotolower` function, which expects a string.

How to fix?

Made a surprise finding of a closed issue on Github:

I was just about to patch the line as described in this comment to the issue by prepending `(string)` to the function call. However, in order to be able to do this, I amended my Dockerfile so that it installed the Vim text editor, and after I had re-built the Docker image and re-started it, the error went away – just as someone described in the issue’s comment thread.

So if someone finds this thread here on the forum, keep calm and try the above…

1 Like