Hi, I have a strange problem here. I try to authenticate users with LDAP at an Active Directory Server (AD). Everything works fine. Just in some cases, authentication is not possible. As we discovered, this has something to do with a strange DNS Server setting. Sometimes a nslookup for the (imaginary) host example.ch returns an address and sometimes it does not. In times when the DNS server reports an (arbitrary) address the authentication process gets broken. Some testing with tcpdumps and the like enabled us to locate the problem in the php function ldap_search. If this function is called like it is shown in the code below, it starts a DNS query to the context (example.ch in this case). So my question is, why does "ldap_search" start a DNS query for the context? Since I'm not able to make any changes to the DNS server, I need the php-side get fixed. Does anyone has an idea? Regards, Jan <?php // $server == LDAP Server // $bind_cn == Distinguished Name of (AD) LDAP Bind User // $bind_pw == Password of (AD) LDAP Bind User // "DC=example,DC=ch" == User lookup Context $con = ldap_connect($server); $bnd = ldap_bind($con, $bind_cn, $bind_pw); $res = ldap_search($con, "DC=example,DC=ch", "sAMAccountName=username"); ldap_close($con); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php