Page 1 of 1

PHP LDAP using TLS

Posted: Tue Aug 10, 2004 11:19 am
by pickle
Hi Everyone,

The ldap server I authenticate to was recently upgraded to use TLS for it's ldaps connections. I found out that PHP uses SSLv2, and the ldap server uses TLSv3. So, I added this code:

Code: Select all

ldap_set_option($ldapconn,LDAP_OPT_PROTOCOL_VERSION,3);
ldap_start_tls($ldapconn);
only to get the error that

Code: Select all

"Warning: ldap_start_tls(): Unable to start TLS: Can't contact LDAP server in /path/to/file.php on line XXX".
Now, it doesn't say it's not supported, just that it was unable to start TLS. What does this mean (big picture, not just the text of the error)?

The latest version of OPENLdap was installed and started last night, but the module PHP was compiled with is 1.3. Do I need to re-compile PHP with a new version of openldap or can I just re-compile that particular module? I'm a bit of a novice when it comes to compiling stuff, so please bear with me. Thanks everyone!!

Also: PHP version 4.3.3, openssl module version 0.97a



------------------------------------------------------------------------------------------------------------------
EDIT: I've discovered that despite the fact that PHP says it's using protocol version 3, the LDAP server it's talking to thinks it's using protocol version 2. Any ideas why?