I'm trying to connect my php application to authentication with Active Directory of Windows Server 2003, using ssl secure authentication. but it does not connect returns this error
PHP Warning: ldap_bind (): Unable to bind to server: Can not contact LDAP server in /var/www/html/Ldap/teste1.php
// Here is the code I use
AD_server = "ldaps://meuservidor";
$AD_Auth_User = "password";
$protocolVersion = 3;
$ldap = ldap_connect($AD_server);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, $protocolVersion) ;
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_bind($ldap);
if (ldap_errno($ldap)) {
exit('Nao foi possivel conectar no servidor');
}else{
return true;
}
?>