Support » Plugin: authLdap » Debug?

  • Resolved Steve Cliff



    I’m trying to figure out why I can’t get authentication working against our LDAP with this plugin and have ticked the “Debug AuthLDAP” option but don’t know where to find any debug logs it produces.

    Could you give me some guidance please on what the option actually does and where I need to look?

    Many thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author heiglandreas


    The Debug-Info is put into the “default” PHP-Logfile. Usually that is the same log as the server-log. So when you are running on apaches httpd on a unix-system I’d have a look at /var/log/apache2/ and see whether there’s an error-log file.

    Thanks for the quick response!

    I’ve found “LDAP authentication failed with exception: bind was not successfull: Can’t contact LDAP server”. Digging in to it now but it’s odd as I’m currently browsing the LDAP using the same credentials I’ve entered.

    NB. I’m not suggesting this is a bug in your plugin btw – 99.9% it will be my bad understanding of LDAP 🙂 Will keep looking …


    Plugin Author heiglandreas


    Hey Steve.

    Can you perhaps provide me the LDAP-URI? And are you browsing the LDAP from the same machine as the webserver?

    The format of URI I am using is:


    Results in:
    “[Tue Dec 26 12:11:10.700096 2017] [php7:notice] [pid 1520:tid 1348] [client ::1:58787] [AuthLDAP] LDAP authentication failed with exception: bind was not successfull: Can’t contact LDAP server, referer: http://localhost/wp-login.php

    The utility I’m using is Windows based but this works:

    It’s not an exact test though I think as although the web site is running on my Windows machine, it’s using Uwamp?

    • This reply was modified 2 years, 10 months ago by Steve Cliff.

    Yeah, it’s definitely not your plugin 🙂

    I’ve run the following and this won’t connect either …

    //LDAP server address
    $server = "ldaps://";
    //domain user to connect to LDAP
    $user = "xxUK02919";
    //user password
    $psw = "xxx";
    //FQDN path where search will be performed. OU - organizational unit / DC - domain component
    $dn = "ou=people,dc=xxx,dc=com";
    //Search query. CN - common name (CN=* will return all objects)
    $search = "CN=*";                    
    // ------------------------------------------------------------------------
    echo "<h2>php LDAP query test</h2>";
    // connecting to LDAP server
    echo "ldap_connect triggered against ", $server;
    $r=ldap_bind($ds, $user , $psw); 
    echo "ldap_bind triggered against user=", $user, " password=", $psw;
    // performing search
    $sr=ldap_search($ds, $dn, $search);
    $data = ldap_get_entries($ds, $sr);    
    echo "Found " . $data["count"] . " entries";
    for ($i=0; $i<$data["count"]; $i++) {
     echo "<h4><strong>Common Name: </strong>" . $data[$i]["cn"][0] . "</h4><br />";
     echo "<strong>Distinguished Name: </strong>" . $data[$i]["dn"] . "<br />";
     //checking if discription exists 
     if (isset($data[$i]["description"][0])) 
     echo "<strong>Desription: </strong>" . $data[$i]["description"][0] . "<br />";
     echo "<strong>Description not set</strong><br />";
     //checking if email exists
     if (isset($data[$i]["mail"][0]))
     echo "<strong>Email: </strong>" . $data[$i]["mail"][0] . "<br /><hr />";
     echo "<strong>Email not set</strong><br /><hr />";
     // close connection
    Plugin Author heiglandreas


    ldaps is a pain especially with self-signed certificates. ANd combined with windows it sadly only gets worse. I’m absolutely sorry but I’m not able to help you there due to missing access to windows-environments 🙁

    Is there a possibility to use START_TLS? That might be easier…

    Don’t worry – I appreciate your comments/help anyway – unfortunately I’m stuck with what I’ve got as I don’t control the LDAP service we have to use.

    Thanks again anyway.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Debug?’ is closed to new replies.