Hi,
I'm currently trying to seach windows 2003 active directory for user information. Even with the query
dc=mydomain,dc=com and cn=*
I only ever get the top level searched, i.e. only about 10 answers, all system accounts. There should be 1000's and if I use ldapsearch from the command prompt with the same query they are all returned.
My code is very simply using
$ds=ldap_connect("localhost");
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$r=ldap_bind($ds);
$sr=ldap_search($ds,"dc=mydomain,dc=com", "cn=*");
$ldapResults = ldap_get_entries($ds, $sr);
for ($item = 0; $item < $ldapResults['count']; $item++)
{
Then loop through the results.
Any ideas how to get this to search the entire directory and not just the top level?
Thanks.
I'm currently trying to seach windows 2003 active directory for user information. Even with the query
dc=mydomain,dc=com and cn=*
I only ever get the top level searched, i.e. only about 10 answers, all system accounts. There should be 1000's and if I use ldapsearch from the command prompt with the same query they are all returned.
My code is very simply using
$ds=ldap_connect("localhost");
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$r=ldap_bind($ds);
$sr=ldap_search($ds,"dc=mydomain,dc=com", "cn=*");
$ldapResults = ldap_get_entries($ds, $sr);
for ($item = 0; $item < $ldapResults['count']; $item++)
{
Then loop through the results.
Any ideas how to get this to search the entire directory and not just the top level?
Thanks.