Problem with LDAP via SSL
Posted: Thu May 07, 2009 6:48 pm
I have a problem with LDAP over SSL.
I install Active Directory (ADAM) on Win XP and tuned up all necessary certificates for ADAM. So I can connect from ldp.exe to ADAM with SSL on port 636.
But I can't make it from PHP.
If I try without SSL it works perfect. But with ssl it always give me a ERROR
Somebody can help me?
I install Active Directory (ADAM) on Win XP and tuned up all necessary certificates for ADAM. So I can connect from ldp.exe to ADAM with SSL on port 636.
But I can't make it from PHP.
Code: Select all
if ($this->_use_ssl){
$this->_conn = ldap_connect("ldaps://".$dc, 636);
} else {
$this->_conn = ldap_connect($dc, 389);
}
//set some ldap options for talking to AD
ldap_set_option($this->_conn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($this->_conn, LDAP_OPT_REFERRALS, 0);
$this->_bind = ldap_bind($this->_conn,$this->_ad_username.$this->_account_suffix,$this->_ad_password);FATAL: AD bind failed. Either the LDAPS connection failed or the login credentials are incorrect.PHP Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in C:\Inetpub\wwwroot\sugarcrm\include\ldap\adLDAP.php on line 118
Somebody can help me?