From: tedc21thc at hotmail dot com
Operating system: FreeBSD 7.1
PHP version: 5.2.9
PHP Bug Type: LDAP related
Bug description: ldap_list get "Decoding error" on some specific searching
attribute
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 bug report at http://bugs.php.net/?id=47786&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47786&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47786&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47786&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47786&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47786&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47786&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47786&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47786&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47786&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47786&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47786&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47786&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47786&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47786&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47786&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47786&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47786&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47786&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47786&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47786&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47786&r=mysqlcfg