title: ldap_bind(): Unable to bind to server
body: <p>I have below code and I am getting error:</p>
  
  <p>Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in C:\xampp\htdocs\ldap.php on line 17</p>
  
  <pre><code>&lt;?php
  $ldapconfig['host'] = "dsua1.company.com";
  $ldapconfig['port'] = 636;
  $ldapconfig['basedn'] = "cn=userid,ou=Applications,ou=Company,ou=Services,dc=iM-2,dc=com";
  $ldapconfig['binddn'] = "userid";
  $ldapconfig['bindpw'] = "password";
  $ldapconn=ldap_connect($ldapconfig['host'],$ldapconfig['port']);
  
  ldap_bind($ldapconn, $ldapconfig['binddn'], $ldapconfig['bindpw']);
  ?&gt;
  </code></pre>