Can anyone help me with this PHP auth code, I am trying to auth against zimbra and I keep getting "LDAP bind failed". what am i missing here as far as code goes? Any help would be greatly appreciated.
Code:
$Domain = 'mydomain';
$Server = 'zwm.mydomain.com';
$Username = 'username1@mydomain.com';
$Password = 'xxxx';
$LDAPConnection = ldap_connect($Server,389);
ldap_set_option($LDAPConnection,LDAP_OPT_PROTOCOL_VERSION,3);
$LDAPbind = @ldap_bind($LDAPConnection,'uid='.$Username.',ou=people,dc='.$Domain.',dc=com' , $Password);
if ($LDAPbind) {
echo "LDAP bind successful...";
} else {
echo "LDAP bind failed...";
}