I'm writing PHP code and trying to connect to VMware View ADAM database but unfortunately without success. This is LDAP type of database, similar to Active Directory but can not make it to work! A user which is connecting to ADAM is a Active Directory domain user.
So here is the code:
private $ldap_server = "ldap://adam.domain.com";
private $auth_user = "UID=adam.read,OU=someOU,OU=ServiceAccs,DC=domain,DC=com";
private $auth_pass = "password";
$ADAMconnection=ldap_connect($this->ldap_server);
ldap_set_option ($ADAMconnection, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ADAMconnection, LDAP_OPT_PROTOCOL_VERSION, 3);
if ($ADAMconnection) {
$r=ldap_bind($ADAMconnection, $this->auth_user, $this->auth_pass); // line 29
if($r)
{
echo "<p>Bind successful</p>";
}
else
{
echo "<p>Bind not successful</p>";
}
echo "<p> $r</p>";
}
And this is the warning I get at line 29 (bind statement):
Warning: ldap_bind(): Unable to bind to server: Other (e.g., implementation specific) error
User has 'read' permissions - I checked with ADSIEdit. I also tried replacing the username with the following code but still without success:
private $auth_user = "adam.read@domain.com";
EDIT: Forgot to mention programming environment.