I have a really simple question on LDAP bind. I just want to try the anonymous bind to the AD controller, but the bind failed. Is there something wrong with configuration???? HELP REALLY NEEDED!
Here is my simple code:
Code: Select all
?php
//using ldap bind anonymously
$host = 'ldaps://123.45.67.89/'; //the IP address of AD controller
$ldapconn = ldap_connect($host)
or die("Could not connect to LDAP server.");
if ($ldapconn)
{
// binding anonymously
$ldapbind = ldap_bind($ldapconn);
// verify binding
if ($ldapbind)
{
echo "LDAP bind successful...<br />";
}
else
{
echo "LDAP bind failed...";
}
}
?>Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in C:\wamp\virtual\wga\itest2\www\ldapConnect\abind.php on line 14
LDAP bind failed...
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: