hi, i am trying to bind to an ldap server, but as of yet have been unable to. This is the error I get:
Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Connect error in C:\apache\htdocs\tool\connect_ldap.php on line 46 LDAP TLS error.
And this is my code (assuming $password, $username, $ou, and $dc have all been assigned correctly)
$conn = ldap_connect(ldap.learning.com, 389) or die ("Connection failed.");
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3) or die ("Can't use version 3!");
ldap_start_tls($conn) or die("LDAP TLS error.");
if ($password)
$auth = @ldap_bind($conn, "uid=$username,ou=$ou,dc=$dc,dc=com", password);
ldap_close($conn);
any ideas? should ldap be based on the same server. i havn't the slightest idea. any help would be greatly appreciated.