[horde] LDAPv3 Support Broken Again...

Michael J. Pelletier mjpelletier at mjpelletier.com
Fri Feb 13 22:27:05 PST 2004


Hello,

I made a hack, thanks to Michael Dunston, to fix the broken LDAP support for
version three (LDAPv3) by adding the following to
Horde/framework/Auth/Auth/ldap.php

$ldap = @ldap_connect($this->_params['hostspec']);

/* This was added to support different LDAP versions. */
	if (isset($this->_params['version'])) {
            if (!ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION,
                                 $this->_params['version'])) {
                Horde::logMessage(
                    sprintf('Set LDAP protocol version to %d failed: [%d] %s',
                            $this->_params['version'],
                            ldap_errno($this->_connection),
                            ldap_error($this->_connection)),
                            __FILE__, __LINE__);
            }
        }

This change was added before every ldap_connect() in Auth/ldap.php. It worked
great. Today when I upgraded, via cvs, all-of-a-sudden things are broken again
as my ldap logs say "historical protocol version requested, use LDAPv3
instead". In other words, even though the code I added is still there, Horde is
still trying to use the old LDAPv2. Can someone please take a peak at this.

Thanks inadvance,
Michael Pelletier

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the horde mailing list