From: andreivig at yahoo dot com Operating system: Fedora Core 6 PHP version: 5.2.5 PHP Bug Type: LDAP related Bug description: ldap_get_entries returns empty objectsid
Description: ------------ I made an application that used LDAP for checking the user credentials When i am using ldap_get_entries on development environment i get an array that has a binary value for objectsid on production environment i get an array that has no value for objectsid. Can you please give me a hint here. The development environment: Fedora Core 7 Apache Version Apache/2.2.8 (Fedora) PHP/5.2.5 PHP Version 5.2.5 LDAP Support enabled RCS Version $Id: ldap.c,v 1.161.2.3.2.11 2007/07/17 09:09:42 jani Exp $ Total Links 0/unlimited API Version 2004 Vendor Name OpenLDAP Vendor Version 0 The production environment: Fedora Core 6 Apache Version: Apache/2.2.4 (Fedora) PHP Version 5.1.6 LDAP Support enabled RCS Version $Id: ldap.c,v 1.161.2.3 2006/01/01 12:50:08 sniper Exp $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor Version 20330 Reproduce code: --------------- define('LDAP_HOST', '192.168.3.20'); define('LDAP_PORT', '389'); define('LDAP_USERNAME', 'test'); define('LDAP_PASSWORD', 'test'); define('LDAP_BASEDN', 'cn=Users, dc=svdomain1,dc=softvision,dc=ro'); define('DS',@ldap_connect(LDAP_HOST,LDAP_PORT)); ldap_set_option(DS, LDAP_OPT_PROTOCOL_VERSION, 3); define('LDAPBIND',ldap_bind(DS, LDAP_USERNAME, LDAP_PASSWORD)); .... $r = ldap_search( DS, LDAP_BASEDN, 'sAMAccountName=' .$user, array('objectsid')); $result = ldap_get_entries( DS, $r); Expected result: ---------------- Array ( [count] => 1 [0] => ��������ߢ-¹õ?ig¥Ã�� ) Actual result: -------------- Array ( [0] => [count] => 1 ) -- Edit bug report at http://bugs.php.net/?id=44878&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44878&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44878&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44878&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44878&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44878&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44878&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44878&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44878&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44878&r=support Expected behavior: http://bugs.php.net/fix.php?id=44878&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44878&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44878&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44878&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44878&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44878&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44878&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44878&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44878&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44878&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44878&r=mysqlcfg