Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > ldapsearch problems
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 4th May 05:49
michi.fischer
External User
 
Posts: 1
Default ldapsearch problems



hi there,

i'm having a problem regarding ldapsearch(filters).

on the console everything works fine:
<snip>
ldapsearch -bdc=***,dc=at -Dcn=admin,dc=***,dc=at -hxx.xx.xx.xx -p389 -x
-W socialSecurityNumber=*********x
</snip>
with this is get a valid result, but with

but in my php script
<code>
$ldap = ldap_connect('xx.xx.xx.xx','389');
ldap_bind($ldap,'cn=admin,dc=***,dc=at','******');

$filter = "(socialSecurityNumber=*********x)";
$search =
ldap_search($ldap,'ou=People,dc=***,dc=at',filter, array("uid","ou"));
$result = ldap_get_entries($ldap,$search);
var_dump($result);

ldap_unbind($ldap);
</code>

i just get the output:
<snip>
array(1) {
["count"]=>
int(0)
}
</snip>

any ideas?

lg, Michael Fischer
--
email: michi.fischer@gmx.net
web: http://www.webfischer.at
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666