connect AD via php and ssl

0

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;
}
?>
    
asked by anonymous 15.07.2014 / 20:25

1 answer

1

First perform a connection test on port 636 of the LDAP server.

LDAP uses port 389, LDAP (LDAP over SSL) already uses port 636. Can you connect to this port through a telnet connection?

    
19.07.2014 / 22:47