PHP 4.0 Bug #9704 Updated: LDAP Referral problem

From: Date: Sun, 01 Apr 2001 18:06:55 +0000
Subject: PHP 4.0 Bug #9704 Updated: LDAP Referral problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-50497@lists.php.net to get a copy of this message
ID: 9704 Updated by: sniper Reported By: yannick@altiva.fr Old-Status: Feedback Status: Closed Bug Type: LDAP related Assigned To: Comments: No feedback and should be fixed now. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-03-12 17:29:33] venaas@php.net 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: $rescodenMatched DN: $matcheddnnError msg: $errmsgn"; echo "Referrals: ", implode("nt", $referrals), "n"; } else { echo "Error parsing result!n"; } Will this suffice? --------------------------------------------------------------------------- [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 (#50497) next »