Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : LDAP Functions : ldap_set_rebind_proc

ldap_set_rebind_proc

Set a callback function to do re-binds on referral chasing (PHP 4 >= 4.2.0, PHP 5)
bool ldap_set_rebind_proc ( resource link, callback callback )


Code Examples / Notes » ldap_set_rebind_proc

pearcec

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


randy

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.

night0wl

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";
 }
}


Change Language


Follow Navioo On Twitter
ldap_8859_to_t61
ldap_add
ldap_bind
ldap_close
ldap_compare
ldap_connect
ldap_count_entries
ldap_delete
ldap_dn2ufn
ldap_err2str
ldap_errno
ldap_error
ldap_explode_dn
ldap_first_attribute
ldap_first_entry
ldap_first_reference
ldap_free_result
ldap_get_attributes
ldap_get_dn
ldap_get_entries
ldap_get_option
ldap_get_values_len
ldap_get_values
ldap_list
ldap_mod_add
ldap_mod_del
ldap_mod_replace
ldap_modify
ldap_next_attribute
ldap_next_entry
ldap_next_reference
ldap_parse_reference
ldap_parse_result
ldap_read
ldap_rename
ldap_sasl_bind
ldap_search
ldap_set_option
ldap_set_rebind_proc
ldap_sort
ldap_start_tls
ldap_t61_to_8859
ldap_unbind
eXTReMe Tracker