<p>In more testing, I was able to eliminate the "Can't bind to LDAP server!" error message from Craft by removing both: Account Suffix and Admin Account Suffix settings from the ADLDAP parameter control panel.<br>
In my particular setup, I left all parameters empty in the 'optional' section of the parameter control panel, with the exception of the port ('389') and 'Follow Referrals.'</p>

CC BY-SA 3.0
2017-11-13T15:39:09.283Z
2017-11-13T15:39:09.283Z
buck1112
<p>I'm working with the ADLDAP plugin in order to provide frontend authentication against my organizations Active Directory.  The problem is that I continually receive the message "Can't bind to LDAP server!" after attempting to log in.</p>

<p>I tested the LDAP connection first on Windows Server 2016, by using the built in LDP.exe utility, and that test proved successful.
Next, I constructed a pure PHP page, and the LDAP binding was successful.<br>
Here is that code:</p>

<pre class="lang-php prettyprint-override"><code>&lt;?php

// using ldap bind
$ldaprdn  = '*****';     // ldap rdn or dn
$ldappass = '*****';  // associated password

// connect to ldap server
$ldapconn = ldap_connect("***.***.***.***")
    or die("Could not connect to LDAP server.");

if ($ldapconn) {

    // binding to ldap server
    $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);

    // verify binding
    if ($ldapbind) {
        echo "LDAP bind successful...";
    } else {
        echo "LDAP bind failed...";
    }

}

?&gt;
</code></pre>

<p>In Craft, I carefully followed the installation instructions, per the page: <a href="https://github.com/thepitagroup/adldap_craftcms" rel="nofollow noreferrer">https://github.com/thepitagroup/adldap_craftcms</a> as well as the changes introduced in the thread: <a href="https://github.com/thepitagroup/adldap_craftcms/issues/1" rel="nofollow noreferrer">https://github.com/thepitagroup/adldap_craftcms/issues/1</a>.
These changes were helpful and got me a little further along, but now, I'm stuck with the error message: "Can't bind to LDAP server!"
The url remains on the 'login' page.</p>

<p>Is there a way to find more detail as to the cause of the error?</p>

<p>Thanks for any help.</p>

<plugins><authentication><windows><plugin-adldap>
Using ADLDAP plugin in Craft 2.6 - can't bind to LDAP
# Using ADLDAP plugin in Craft 2.6 - can't bind to LDAP

(Asked by: username_0 on 2017-11-09)

I'm working with the ADLDAP plugin in order to provide frontend authentication against my organizations Active Directory.  The problem is that I continually receive the message "Can't bind to LDAP server!" after attempting to log in.
I tested the LDAP connection first on Windows Server 2016, by using the built in LDP.exe utility, and that test proved successful.
Next, I constructed a pure PHP page, and the LDAP binding was successful.
Here is that code:


In Craft, I carefully followed the installation instructions, per the page: https://github.com/thepitagroup/adldap_craftcms as well as the changes introduced in the thread: https://github.com/thepitagroup/adldap_craftcms/issues/1.
These changes were helpful and got me a little further along, but now, I'm stuck with the error message: "Can't bind to LDAP server!"
The url remains on the 'login' page.
Is there a way to find more detail as to the cause of the error?
Thanks for any help.

**Tags:** plugins, authentication, windows, plugin-adldap


---

## 1 answers

### Answer by username_0 on 2017-11-13. Score: 1

In more testing, I was able to eliminate the "Can't bind to LDAP server!" error message from Craft by removing both: Account Suffix and Admin Account Suffix settings from the ADLDAP parameter control panel.  
In my particular setup, I left all parameters empty in the 'optional' section of the parameter control panel, with the exception of the port ('389') and 'Follow Referrals.'


---

