ID: 47786 Updated by: j...@php.net Reported By: tedc21thc at hotmail dot com -Status: Open +Status: Feedback Bug Type: LDAP related Operating System: FreeBSD 7.1 PHP Version: 5.2.9 New Comment:
What makes you think it's not expected result? >From manual about ldap_list(): "LDAP_SCOPE_ONELEVEL means that the search should only return information that is at the level immediately below the base_dn given in the call. (Equivalent to typing "ls" and getting a list of files and folders in the current working directory.)" Previous Comments: ------------------------------------------------------------------------ [2009-03-26 09:46:53] 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" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47786&edit=1