I'm trying to develop an application which uses the same login we use in our company to log in our computer, that is, an Active Directory.
So, I'm sure which is my user and my password but it seems every time I try to bind it throws this:
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server
But the ldap_connect success.
So, it must be something related with the username.
I've tried with:
$user='cn=username,o=domainname';
and
$user='domainname\username';
Without success. I've admin access to the domain controller so I could find whatever is needed.
Can someone bring some light to this?
Best Answer
You do not connect when calling
ldap_connect
. See the PHP manual:I guess you have some network problems here. One of the following: