|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-12 09:17 UTC] yannick at altiva dot 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
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?