php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9704 LDAP Referral problem
Submitted: 2001-03-12 09:17 UTC Modified: 2001-04-01 14:06 UTC
From: yannick at altiva dot fr Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.0.4pl1 OS: Linux Mandrake 7.2 (i386)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yannick at altiva dot fr
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-12 17:29 UTC] 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: $rescode\nMatched DN:                          $matcheddn\nError msg: $errmsg\n";
    echo "Referrals: ", implode("\n\t", $referrals), "\n";
} else {
    echo "Error parsing result!\n";
}

Will this suffice?

 [2001-04-01 14:06 UTC] sniper@php.net
No feedback and should be fixed now.

--Jani

 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 14:05:52 2023 UTC