title: Can't bind to LDAP
body: <p>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: </p>
  
  <p>Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server</p>
  
  <p>But the ldap_connect success.</p>
  
  <p>So, it must be something related with the username.</p>
  
  <p>I've tried with:</p>
  
  <pre><code>$user='cn=username,o=domainname';
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$user='domainname\username';
  </code></pre>
  
  <p>Without success. I've admin access to the domain controller so I could find whatever is needed. </p>
  
  <p>Can someone bring some light to this?</p>