1

Trying to install phpLDAPadmin 1.2.5 from https://github.com/leenooks/phpLDAPadmin.git but running into an issue.

On the one hand it seems to have installed (at least partly) correct, because from an ssh window I can login using "elinks http://localhost/phpLDAPadmin" (or https, works both). I can click the link 'login' and then enter my credentials in the form. On the other hand, when I want to open the site on my work laptop, I can click the login link all I want, but it will not display a login form. It will hang on a progress bar reading "Loading Login..."

No error is thrown in the nginx error log, no error is thrown in the browser from timeout or anything, and I cannot really see anything relevant in the phpLDAPadmin debug log. But of course, I might be missing something :-)

Any help on getting this to work is most appreciated.

System info

OS: ubuntu 20.04
Web server: nginx 1.18.0
PHP version: 7.4.3
pla version: 1.2.5
OpenLDAP/slapd: 2.4.49
A firewall on the network level will block any port 389 traffic coming from the internet (i.e. my home office) to the server, but I imagine a web interface will communicate strictly over port 443, correct?

/var/www/html/phpLDAPadmin/config/config.php

$config->custom->debug['level'] = 255;
$config->custom->debug['syslog'] = true;
$config->custom->debug['file'] = '/tmp/pla_debug.log';

$config->custom->appearance['hide_template_warning'] = true;

$servers = new Datastore();
$servers->newServer('ldap_pla');
$servers->setValue('server','name','LDAP for MYSITE');
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','port',389);
$servers->setValue('server','base',array('dc=ldap,dc=MYSITE,dc=nl'));
$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','cn=admin,dc=ldap,dc=MYSITE,dc=nl');
$servers->setValue('login','bind_pass','***');
$servers->setValue('server','tls',false);

/etc/nginx/sites-enabled/www.conf

# Redirect alle http naar https
server {
    listen 80 default_server;
    server_name _;
    return 301 https://$host$request_uri;
}


server {
    listen 443 ssl;
    server_name MYSITE;

    # SSL configuration
    ssl_certificate /etc/letsencrypt/live/MYSITE/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/MYSITE/privkey.pem; # managed by Certbot

    return 301 https://www.MYSITE$request_uri;

}

server {
    listen 443 ssl default_server;
    server_name www.MYSITE;

    # SSL configuration
    ssl_certificate /etc/letsencrypt/live/www.MYSITE/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/www.MYSITE/privkey.pem; # managed by Certbot

    root /var/www/html;
    index index.php index.html;
    location / {
        try_files $uri $uri/ =404;
    }
    location ~ \.php$ {
        include fastcgi.conf;
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_index index.php;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    }

    # Logging
    access_log /var/log/nginx/www_access.log;
    error_log /var/log/nginx/www_error.log warn;
}

/tmp/pla_debug.log

[0.000]          common(0214-001): : Application (1.2.5) initialised and starting with (a:0:{}).
[0.001]       functions(0130-001): app_error_handler: Entered (8192|Function get_magic_quotes_gpc() is deprecated|/var/www/html/phpLDAPadmin/lib/common.php|299|a:18:{s:4:"_GET";a:0:{}s:5:"_POST";a:0:{}s:7:"_COOKIE";a:0:{}s:6:"_FILES";a:0:{}s:3:"app";a:8:
[0.000]              ds(0684-017): Datastore::Instance: Entered ()
[0.000]              ds(0651-017): Datastore::getServerList: Entered (NOARGS)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]     ds_ldap_pla(0645-017): ldap_pla::isSessionValid: Entered (NOARGS)
[0.000]              ds(0493-017): DS::inactivityTime: Entered (NOARGS)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered (NOARGS)
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0287-017): DS::isLoggedIn: Entered (user)
[0.000]              ds(0457-017): DS::getMethod: Entered (user)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0157-017): DS::getLogin: Entered (user)
[0.000]              ds(0457-017): DS::getMethod: Entered (user)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|bind_id)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0157-017): DS::getLogin: Entered (anon)
[0.000]              ds(0457-017): DS::getMethod: Entered (anon)
[0.000]           hooks(0054-257): run_hook: Entered (post_session_init|a:0:{})
[0.000]           hooks(0060-257): run_hook: Returning, HOOK not defined (post_session_init)
[0.000]             cmd(0037-128): : Ready to render page for command [,welcome.php].
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]            page(0030-129): page::__construct: Entered (1)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]       functions(3245-001): isAjaxEnabled: Entered (NOARGS)
[0.000]            page(0236-129): page::block_add: Entered (body|OBJECT:block)
[0.000]            page(0369-129): page::display: Entered (NOARGS)
[0.000]            page(0097-129): page::pageheader_print: Entered (NOARGS)
[0.000]            page(0143-129): page::head_print: Entered (NOARGS)
[0.000]       functions(0351-001): cmd_control_pane: Entered (top)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (cmd|oslinks)
[0.000]            page(0179-129): page::control_print: Entered (NOARGS)
[0.000]       functions(0351-001): cmd_control_pane: Entered (main)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (script|purge_cache)
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (script|show_cache)
[0.000]            page(0207-129): page::tree: Entered (NOARGS)
[0.000]  config_default(0817-003): Config::getServerList: Entered (NOARGS)
[0.000]              ds(0651-017): Datastore::getServerList: Entered (1)
[0.000]  config_default(0817-003): Config::getServerList: Entered (NOARGS)
[0.000]              ds(0651-017): Datastore::getServerList: Entered (1)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]            Tree(0043-033): Tree::getInstance: Entered (1)
[0.000]       functions(0911-001): get_cached_item: Entered (1|tree)
[0.000]       functions(0921-001): get_cached_item: Returning ()
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]            Tree(0030-033): Tree::__construct: Entered (1)
[0.000]              ds(0157-017): DS::getLogin: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]        HTMLTree(0029-033): HTMLTree::draw: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]        HTMLTree(0161-033): HTMLTree::draw_server_name: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]        HTMLTree(0559-033): HTMLTree::getDepth: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0120-017): DS::getName: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (server|name)
[0.000]              ds(0493-017): DS::inactivityTime: Entered (NOARGS)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered (NOARGS)
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0287-017): DS::isLoggedIn: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]        HTMLTree(0515-033): HTMLTree::draw_login_link: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]       functions(1013-001): get_custom_file: Entered (1|login_form|)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0072-017): .DS::getValue: Entered (custom|pages_prefix)
[0.000]       functions(1024-001): get_custom_file: Returning (login_form)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]       functions(3245-001): isAjaxEnabled: Entered (NOARGS)
[0.000]              ds(0120-017): DS::getName: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (server|name)
[0.000]        HTMLTree(0559-033): HTMLTree::getDepth: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0120-017): DS::getName: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (server|name)
[0.000]        HTMLTree(0559-033): HTMLTree::getDepth: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]        HTMLTree(0559-033): HTMLTree::getDepth: Entered (NOARGS)
[0.000]            Tree(0096-033): Tree::getServer: Entered (NOARGS)
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]        AJAXTree(0212-033): AJAXTree::draw_javascript: Entered (NOARGS)
[0.000]        HTMLTree(0544-033): HTMLTree::draw_javascript: Entered (NOARGS)
[0.000]            page(0297-129): page::body: Entered (NOARGS)
[0.000]            page(0321-129): page::footer_print: Entered (NOARGS)
[0.000]          common(0214-001): : Application (1.2.5) initialised and starting with (a:3:{s:3:"cmd";s:10:"login_form";s:9:"server_id";s:1:"1";s:4:"meth";s:4:"ajax";}).
[0.001]       functions(0130-001): app_error_handler: Entered (8192|Function get_magic_quotes_gpc() is deprecated|/var/www/html/phpLDAPadmin/lib/common.php|299|a:15:{s:4:"_GET";a:3:{s:3:"cmd";s:10:"login_form";s:9:"server_id";s:1:"1";s:4:"meth";s:4:"ajax
[0.000]              ds(0684-017): Datastore::Instance: Entered (1)
[0.000]              ds(0694-003): Datastore::Instance: Returning instance of database (1)
[0.000]     ds_ldap_pla(0645-017): ldap_pla::isSessionValid: Entered (NOARGS)
[0.000]              ds(0493-017): DS::inactivityTime: Entered (NOARGS)
[0.000]              ds(0287-017): DS::isLoggedIn: Entered (NOARGS)
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]              ds(0287-017): DS::isLoggedIn: Entered (user)
[0.000]              ds(0457-017): DS::getMethod: Entered (user)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0157-017): DS::getLogin: Entered (user)
[0.000]              ds(0457-017): DS::getMethod: Entered (user)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|bind_id)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0157-017): DS::getLogin: Entered (anon)
[0.000]              ds(0457-017): DS::getMethod: Entered (anon)
[0.000]           hooks(0054-257): run_hook: Entered (post_session_init|a:0:{})
[0.000]           hooks(0060-257): run_hook: Returning, HOOK not defined (post_session_init)
[0.000]             cmd(0037-128): : Ready to render page for command [login_form,/var/www/html/phpLDAPadmin/htdocs/login_form.php].
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]            page(0030-129): page::__construct: Entered (1)
[0.000]              ds(0431-017): DS::isReadOnly: Entered (NOARGS)
[0.000]              ds(0157-017): DS::getLogin: Entered ()
[0.000]              ds(0457-017): DS::getMethod: Entered ()
[0.000]  config_default(0705-003): Config::isCommandAvailable: Entered (script|login_form)
[0.000]              ds(0120-017): DS::getName: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (server|name)
[0.000]              ds(0133-017): DS::getAuthType: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_type)
[0.000]              ds(0441-017): .DS::getIndex: Entered (NOARGS|1)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|auth_text)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|attr)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|bind_dn_template)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|attr|)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|bind_id)
[0.000]     ds_ldap_pla(0189-017): ldap_pla::isAnonBindAllowed: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|allowed_dns)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|anon_bind)
[0.000]     ds_ldap_pla(0198-017): ldap_pla::isAnonBindAllowed: Returning (1)
[0.000]     ds_ldap_pla(0189-017): ldap_pla::isAnonBindAllowed: Entered (NOARGS)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|allowed_dns)
[0.000]              ds(0072-017): .DS::getValue: Entered (login|anon_bind)
[0.000]     ds_ldap_pla(0198-017): ldap_pla::isAnonBindAllowed: Returning (1)
[0.000]       functions(3245-001): isAjaxEnabled: Entered (NOARGS)
[0.000]            page(0236-129): page::block_add: Entered (body|OBJECT:block)
[0.000]            page(0334-129): page::show: Entered (BODY|1|)
[0.000]            page(0297-129): page::body: Entered ()

/var/log/nginx/www_access.log | grep login

127.0.0.1 - - [14/Jun/2021:12:03:00 +0200] "GET /phpLDAPadmin/htdocs/cmd.php?cmd=login_form&server_id=1 HTTP/1.1" 200 5097 "https://localhost/phpLDAPadmin/htdocs/index.php" "ELinks/0.13.1 (textmode; Linux 5.4.0-73-generic x86_64; 253x68-2)"
127.0.0.1 - - [14/Jun/2021:12:03:09 +0200] "POST /phpLDAPadmin/htdocs/cmd.php HTTP/1.1" 302 5 "https://localhost/phpLDAPadmin/htdocs/cmd.php?cmd=login_form&server_id=1" "ELinks/0.13.1 (textmode; Linux 5.4.0-73-generic x86_64; 253x68-2)"
MYIPADDRESS - - [14/Jun/2021:12:12:29 +0200] "GET /phpLDAPadmin/htdocs/images/default/login.png HTTP/2.0" 200 654 "https://www.MYSITE/phpLDAPadmin/htdocs/index.php" "Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/91.0.4472.80 Mobile/15E148 Safari/604.1"
MYIPADDRESS - - [14/Jun/2021:12:12:31 +0200] "GET /phpLDAPadmin/htdocs/cmd.php?cmd=login_form&server_id=1&meth=ajax HTTP/2.0" 200 570 "https://www.MYSITE/phpLDAPadmin/htdocs/index.php" "Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/91.0.4472.80 Mobile/15E148 Safari/604.1"
MYIPADDRESS - - [14/Jun/2021:12:30:14 +0200] "GET /phpLDAPadmin/htdocs/cmd.php?cmd=login_form&server_id=1&meth=ajax HTTP/2.0" 200 570 "https://www.MYSITE/phpLDAPadmin/htdocs/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"

/var/log/nginx/www_error.log

Exactly nothing...

0 Answers0