|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-30 16:23 UTC] sniper@php.net
[2005-08-30 17:04 UTC] niltonneto at celepar dot pr dot gov dot br
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 23:00:02 2025 UTC |
Description: ------------ I had installed PHP 4.3.10. When I upgraded for PHP 4.4, the function ldap_parse_reference not worked. The third parameter (array &referral) not works. Reproduce code: --------------- function get_ldap_referrals($ds, $dn, $filter) { ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_set_option($ds,LDAP_OPT_PROTOCOL_VERSION,3); if ($ds) { ldap_bind($ds); $sr=ldap_list($ds,$dn, $filter); $ref = ldap_first_reference($ds, $sr); $array_referral = array(); $referrals = array(); $idx = 0; while ($ref) { if (ldap_parse_reference($ds, $ref,&$referrals)) { while ($referral = array_shift($referrals)) $array_referral[$idx++] = $referral ; } $ref = ldap_next_reference($ds, $ref); } return $array_referral; } else return false; } Expected result: ---------------- My function return all referrals from ldap server.