Good day! How do we know that a LDAP server allows anonymous connections?
When i run my php program:
i get this error:
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in /var/www/sue/ldapTest2.php on line 14
This is my simple sample test program:
LDAP query test";
echo "Connecting …";
$ds=ldap_connect("apserv"); // must be a valid LDAP server!
echo "Connect result is ".$ds."
";
if ($ds) {
echo "Binding …";
$r=ldap_bind($ds); // this is an "anonymous" bind, typically
// read-only access
}
echo "Bind result is ".$r."
";
?>
OUTPUTS:
LDAP query test
Connecting …Connect result is Resource id #2
Binding …
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in /var/www/sue/ldapTest2.php on line 14
Bind result is
Need help.. THANKS.. =)
Best Answer
Is your server up? Verify that it is up by telneting to port 389 first. This looks like a server not running issue.