PHP 4.0 Bug #9704 Updated: LDAP Referral problem

From: Date: Mon, 12 Mar 2001 22:29:34 +0000
Subject: PHP 4.0 Bug #9704 Updated: LDAP Referral problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-48773@lists.php.net to get a copy of this message
ID: 9704 Updated by: venaas Reported By: yannick@altiva.fr Status: Open Bug Type: LDAP related Assigned To: Comments: If you use the latest snapshot or the soon to be released 4.0.5 (or release candidate) and OpenLDAP 2.x.x API, you can tell it not to follow referrals, parse the referral yourself and connect to the master server. I haven't added all the documentation yet, but something like this would catch a referral: ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_bind($ds); $sr=ldap_search($ds,"", "cn=inga cecilie*"); if (ldap_parse_result($ds, $sr, $rescode, $matcheddn, $errmsg, $referrals)) { echo "Result code: $rescode\nMatched DN: $matcheddn\nError msg: $errmsg\n"; echo "Referrals: ", implode("\n\t", $referrals), "\n"; } else { echo "Error parsing result!\n"; } Will this suffice? Previous Comments: --------------------------------------------------------------------------- [2001-03-12 09:17:08] yannick@altiva.fr There is no support for LDAP referral in PHP 4. It's a big problem, because it's not possible to add data in the LDAP Database because the local database is in read only. Only the the master (referral) database is writable. I writed a little function which call "ldap_set_rebind_proc()" but it's used for all the LDAP link-id and it's not really a solution. Is it possible for you to add this type of function ? Or may i have help for write this one ? Greets, Yannick. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9704&edit=2

« previous php.dev (#48773) next »