ldapsearch problems
| From: | Michael Fischer | Date: | Fri, 12 Sep 2008 07:56:04 +0000 |
| Subject: | ldapsearch problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-279934@lists.php.net to get a copy of this message | ||
hi there,
i'm having a problem regarding ldapsearch(filters).
on the console everything works fine:
<snip>
ldapsearch -bdc=xxx,dc=at -Dcn=admin,dc=xxx,dc=at -hxx.xx.xx.xx -p389 -x
-W socialSecurityNumber=xxxxxxxxxx
</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=xxx,dc=at','xxxxxx');
$filter = "(socialSecurityNumber=xxxxxxxxxx)";
$search =
ldap_search($ldap,'ou=People,dc=xxx,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