wheelybird / ldap-user-manager

A PHP web-based interface for LDAP user account management and self-service password change.
MIT License
487 stars 107 forks source link

Setup Page PHP Error #156

Closed StefanArts closed 2 years ago

StefanArts commented 2 years ago

Check the debugging logs Please run the user manager with the debugging settings enabled. This might help you resolve the issue without needing to create a bug report.
Set LDAP_DEBUG and LDAP_VERBOSE_CONNECTION_LOGS to TRUE for LDAP issues.

Version Tried with both latest and tag next_release

Describe the bug Although the server logs indicate, that the connection to the ldap server was successful, the PHP setup page throws errors:

Warning: Undefined array key "HTTP_REMOTE_USER" in /opt/ldap_user_manager/includes/web_functions.inc.php on line 99

Warning: Undefined array key "HTTP_REMOTE_GROUPS" in /opt/ldap_user_manager/includes/web_functions.inc.php on line 100

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /opt/ldap_user_manager/includes/web_functions.inc.php on line 100

Warning: Cannot modify header information - headers already sent by (output started at /opt/ldap_user_manager/includes/web_functions.inc.php:99) in /opt/ldap_user_manager/includes/web_functions.inc.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /opt/ldap_user_manager/includes/web_functions.inc.php:99) in /opt/ldap_user_manager/setup/index.php on line 16

This is before entering the admin password: https://i.imgur.com/RS3pMX2.png

Docker-compose env variables:

      - LDAP_URI=ldap://openldap:1389
      - LDAP_BASE_DN=dc=example,dc=net
      - LDAP_ADMIN_BIND_DN=cn=admin,dc=example,dc=net
      - LDAP_ADMIN_BIND_PWD=password
      - LDAP_ADMINS_GROUP=admins
      - SERVER_HOSTNAME=admin.example.net
      - NO_HTTPS=true
      - ORGANISATION_NAME=Example
      - SITE_NAME=Example
      - LDAP_USER_OU=users
      - LDAP_GROUP_OU=groups
      - LDAP_REQUIRE_STARTTLS=false
      - LDAP_IGNORE_CERT_ERRORS=true
      - LDAP_GROUP_MEMBERSHIP_USES_UID=true
      - DEFAULT_USER_GROUP=default_user
      - EMAIL_DOMAIN=example.net
      - USERNAME_FORMAT={first_name_initial}-{last_name}
      - REMOTE_HTTP_HEADERS_LOGIN=true
      - SMTP_HOSTNAME=mail.example.net
      - SMTP_HOST_PORT=587
      - SMTP_USERNAME=admin@example.net
      - SMTP_PASSWORD=password
      - SMTP_USE_TLS=true
      - EMAIL_FROM_ADDRESS=Example <auth-NOREPLY@example.net>
      - LDAP_DEBUG=true
      - LDAP_VERBOSE_CONNECTION_LOGS=true

Last Server Log messages: [Thu Apr 28 16:27:24.399702 2022] [php:notice] [pid 23] [client ip] Bound successfully as cn=admin,dc=example,dc=net, referer: https://admin.example.net/setup/ [Thu Apr 28 16:27:24.400491 2022] [php:notice] [pid 23] [client ip] Initial setup: able to authenticate as cn=admin,dc=example,dc=net., referer: https://admin.example.net/setup/

wheelybird commented 2 years ago

Do you mean to have REMOTE_HTTP_HEADERS_LOGIN enabled? That's for use with external authentication systems like Authelia.

StefanArts commented 2 years ago

I do, but don't I first have to Setup this interface before adding authelia to it?

StefanArts commented 2 years ago

Okay, I disabled it and will try to enable it again after the setup, thanks!

StefanArts commented 2 years ago

I think I will get it to work, thanks for your quick response!