phpLDAPadmin 2.3 — Debug Guide

Config files inside the phpldapadmin container

Laravel .env (source of truth for env vars)

podman exec -it phpldapadmin cat /app/.env

Cached config (what the app actually uses at runtime)

# LDAP connection settings
podman exec -it phpldapadmin grep -B2 -A15 "'hosts'" /app/bootstrap/cache/config.php

# Session settings
podman exec -it phpldapadmin grep -i "secure\|cookie\|session" /app/bootstrap/cache/config.php | head -15

# APP_KEY
podman exec -it phpldapadmin grep "app_key\|cipher" /app/bootstrap/cache/config.php | head -5

LDAP config definition (shows which env vars are used)

podman exec -it phpldapadmin cat /app/config/ldap.php

phpLDAPadmin-specific config (base_dns, etc.)

podman exec -it phpldapadmin cat /app/config/pla.php

Clear and rebuild config cache

podman exec -it phpldapadmin php artisan config:clear
podman exec -it phpldapadmin php artisan config:cache

Checking LDAP server setup

Verify LDAP is running and check base DN

podman exec -it ldap ldapsearch -x -H ldap://localhost:389 -s base -b "" namingContexts

Expected: namingContexts: dc=pathoris,dc=de (or your configured domain)

If it shows dc=my-domain,dc=com, the custom slapd.conf is not mounted correctly.

Test admin bind

podman exec -it ldap ldapsearch -x -H ldap://localhost:389 \
  -D "cn=admin,dc=pathoris,dc=de" -w admin \
  -b "dc=pathoris,dc=de"

Check slapd config being used

podman logs ldap 2>&1 | grep -E "suffix|rootdn|rootpw"

List all entries

podman exec -it ldap ldapsearch -x -H ldap://localhost:389 \
  -D "cn=admin,dc=pathoris,dc=de" -w admin \
  -b "dc=pathoris,dc=de" "(objectClass=*)"

Connectivity between phpldapadmin and ldap

Test TCP connectivity

podman exec -it phpldapadmin sh -c "nc -zv 172.4.0.11 389 2>&1"

Expected: open

Test LDAP bind from PHP

podman exec -it phpldapadmin php -r "\$c = ldap_connect('ldap://172.4.0.11:389'); ldap_set_option(\$c, LDAP_OPT_PROTOCOL_VERSION, 3); var_dump(ldap_bind(\$c, 'cn=admin,dc=pathoris,dc=de', 'admin'));"

Expected: bool(true)

Test the /ajax/bases endpoint

podman exec -it phpldapadmin sh -c "wget -qO- --post-data='' http://localhost:8080/ajax/bases 2>&1"

Checking logs

phpldapadmin application logs

podman logs phpldapadmin 2>&1 | tail -30

(Requires LOG_CHANNEL=stderr in phpldapadmin.env)

Laravel log file (if LOG_CHANNEL=daily)

podman exec -it phpldapadmin cat /app/storage/logs/laravel.log 2>/dev/null | tail -30

LDAP server logs

podman logs ldap 2>&1 | tail -30

Nginx error log

tail -30 /var/log/nginx/error.log

Container environment

Check what env vars the container sees

podman exec -it phpldapadmin env | grep -i ldap
podman inspect phpldapadmin | grep -A5 -i "env"

Check container user

podman exec -it phpldapadmin id

Check file permissions

podman exec -it phpldapadmin ls -la /app/.env
podman exec -it phpldapadmin ls -la /app/storage/logs/