Thanks for the information. Does the LDAP authentication plugin require that we bind the servers? It was my impression that when it is read only there is no need to bind the servers...I did find another script on the net. It gave me the following output:Unable to bind to server.msg:'Can't contact LDAP server'-1Unable to bind anonymouslymsg't contact LDAP serverBelow is the code:<?php$username = 'user';$password = 'pass';$ldapconfig = 'host';$ldapconfig = '636';$ldapconfig = 'DC=od,DC=server,dc=com';$ds=ldap_connect($ldapconfig, $ldapconfig);ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);ldap_set_option($ds, LDAP_OPT_NETWORK_TIMEOUT, 10);$dn="".$username."";if ($bind=ldap_bind($ds, $dn, $password)) { echo("Login correct");} else { echo("Unable to bind to server.</br>"); echo("msg:'".ldap_error($ds)."'</br>".ldap_errno($ds).""); if ($bind=ldap_bind($ds)) { $filter = "(cn=*)"; if (!($search=@ldap_search($ds, $ldapconfig, $filter))) { echo("Unable to search ldap server<br>"); echo("msg:'".ldap_error($ds)."'</br>"); } else { $number_returned = ldap_count_entries($ds,$search); $info = ldap_get_entries($ds, $search); echo "The number of entries returned is ". $number_returned."<p>"; for ($i=0; $i<$info; $i++) { var_dump($info); } } } else { echo("Unable to bind anonymously<br>"); echo("msg:".ldap_error($ds)."<br>"); }}?>
[testldap1.php.zip](https://forum.osticket.com/assets/files/migrated/FileUpload/12/9628f25932588eb11d403ba899389a.zip)