PHP expects the ldap function ldap_set_rebind_proc to be the one that has tree parameters. As far as I can tell this isn't in the 2.0 release of OpenLDAP. But made it into 2.1. Configure will tell you
checking for 3 arg ldap_set_rebind_proc... no
ldap_set_rebind_proc
(PHP 4 >= 4.2.0, PHP 5)
ldap_set_rebind_proc — Set a callback function to do re-binds on referral chasing
Descrierea
Avertizare
Această funcţie nu este documentată în prezent; este disponibilă numai lista sa de argumente.
ldap_set_rebind_proc
pearcec at commnav dot com
02-May-2003 01:09
02-May-2003 01:09
night0wl at frost dot ath dot cx
02-Apr-2003 05:19
02-Apr-2003 05:19
Couse there was no example code for this function, i had alot of troubles to make it work properly.
So, here is working example:
function rebind_on_ref ($ds, $ldap_url) {
global $binddn; // DN used to bind
global $bindpw; // password used to bind
// required by most modern LDAP servers, use LDAPv3
ldap_set_option($a, LDAP_OPT_PROTOCOL_VERSION, 3);
if (!ldap_bind($a,$binddn,$bindpw)) {
print "Cannot bind";
}
}
randy at kotmail dot com
25-Apr-2002 01:46
25-Apr-2002 01:46
If rebind_proc isn't compiled in slapd, your will never get that funtction working. Check out the new alpha release of slapd and rtfm.
