ID: 44878
Updated by: [EMAIL PROTECTED]
Reported By: andreivig at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: LDAP related
Operating System: Fedora Core 6
PHP Version: 5.2.5
New Comment:
Update your production env. PHP to something more recent. Also check
that you have same openldap libraries on both..
Previous Comments:
------------------------------------------------------------------------
[2008-05-01 07:19:12] andreivig at yahoo dot com
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 this bug report at http://bugs.php.net/?id=44878&edit=1