| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2009-03-26 09:46 UTC] tedc21thc at hotmail dot com
 Description: ------------ target ldap server : notes PHP version : 5.2.9(CLI) OS: FreeBSD ( tested on 5.4 and 7.1) When using "ldap_list" on specific basedn and specific attribute combination will get "Decoding error" (-4) error. look seems like bug #5433.... But "Decoding error" only happens on searching for ("cn","mail","proxyaddresses","ou") attributes, and will NOT get error if changing these attirbute's sorting or add/remove some other attributes. ps: using ldap_search wont get error. Reproduce code: --------------- $ldp_svrip ='192.168.100.150'; // IP $ldp_acc = ''; $ldp_pwd = ''; $ldp_svrport ='5555'; // Port $ldp_dn = 'OU=tw,O=iei2'; // DN $ldp_filter = '(objectclass=*)'; // FILTER $ldp_jth = array("cn","mail","proxyaddresses","ou"); // Attribute $ds = ldap_connect($ldp_svrip, $ldp_svrport) ; $rbind = ldap_bind($ds, $ldp_acc, $ldp_pwd); $sr = @ldap_list($ds, $ldp_dn, $ldp_filter, $ldp_jth); echo LDAP_ERROR($ds); $info = ldap_get_entries($ds, $sr); Expected result: ---------------- "Success" Actual result: -------------- "Decoding error" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 01:00:02 2025 UTC | 
the problem is when I change the searching attribute from ("cn","mail","proxyaddresses","ou") to any other like... ("mail","cn","proxyaddresses","ou") <- only switching sorting or... ("cn","mail","proxyaddresses","ou","something") <- add something or remove something or whatever the result of ""LDAP_ERROR($ds)"" become success, and I can get values from $info = ldap_get_entries($ds, $sr); and following steps.....