PHP Function Ldap_StartTLS
Articles about php function ldap_start_tls
The problem occurs when trying to use the encrypted LDAP protocol (ldaps) over port 389 while using the unencrypted LDAP protocol (ldap). LDAP servers configured with both start-TLS and ldaps running simultaneously on the same port (389) break configuration by displaying "Config invalid, cannot connect" messages.
Adding a simple stub to bind to LDAP over TLS resolves the issue and allows LDAP authentication to work again. This is done by using ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3) in the code below. These are the top rated real world PHP examples of ldap_start_tls extracted from open source projects. You can rate examples to help us improve the quality of examples. Thank you for your help! - Paul Dixon, ITS.