Doc #51638 [NEW]: LDAP Referrals

From: Date: Thu, 22 Apr 2010 17:07:21 +0000
Subject: Doc #51638 [NEW]: LDAP Referrals
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4218@lists.php.net to get a copy of this message
From: Operating system: ALL PHP version: Irrelevant Package: LDAP related Bug Type: Documentation Problem Bug description:LDAP Referrals Description: ------------ I am trying to get a php application to follow ldap referrals, specifically when the local server is a slave, and is used as a read-only server for performance reasons, but has to write to a master server in order to add, modify or delete records. As far as I can tell all I need are three things. A) Set LDAP_OPT_REFERRALS to 1 using ldap_set_options() B) Set a callback function using ldap_set_rebind_proc() C) Create a very simple rebind function. The problem is that there is no documentation on the subject. For example, when I check LDAP_OPTS_REFERRALS using ldap_get_options(), I get an answer of either 0 (when I set it to 0 or false), and an answer of -1 (minus or dash 1) for any other setting, including 1 and TRUE, and it appears that the callback function isn't called. If someone can explain how it is supposed to work enough for me to get it working, I am happy to provide documentation / examples Test script: --------------- ldap_set_option($LDAP_CON, LDAP_OPT_REFERRALS, 1); ldap_set_rebind_proc($LDAP_CON, rebind_on_referral); ... function rebind_on_referral ($link_id, $ldap_url) { $binddn = $_SESSION['ldapab']['binddn']; $bindpw = $_SESSION['ldapab']['password']; if (!ldap_bind($link_id,$binddn,$bindpw)) return 1; // Error else return 0; // Success } Expected result: ---------------- callback function should be called, application should rebind to new ldap server and user should notice nothing Actual result: -------------- PHP appears to ignore the referral and ldap_error returns a "referral" message. -- Edit bug report at http://bugs.php.net/bug.php?id=51638&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51638&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51638&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51638&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51638&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51638&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51638&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51638&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51638&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51638&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51638&r=support Expected behavior: http://bugs.php.net/fix.php?id=51638&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51638&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51638&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51638&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51638&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51638&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51638&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51638&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51638&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51638&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51638&r=mysqlcfg

« previous php.doc.bugs (#4218) next »