Hi,
I managed to LDAP module working somehow...dont know exactly how!!! 😕 Now I can connect to LDAP server but its gives LDAP_BIND error.
Can someone tell me whts wrong in following code:
<?php
// LDAP variables
$ldaphost = "localhost"; // your ldap servers
$ldapport = 389; // your ldap server's port number
// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost, $ldapport)
or die("Could not connect to $ldaphost");
// using ldap bind
if ($ldapconn) {
echo "Connection to LDAP server successful..";
// binding anonymously
$ldapbind = ldap_bind($ldapconn);
if ($ldapbind) {
echo "LDAP bind anonymous successful...";
} else {
echo "LDAP bind anonymous failed...";
}
}
?>