[Date Prev][Date Next]
PHP and ldap_search. One level only?
I'm still having a hard time figuring out how to use several ldap options...
I'm working on a PHP script and right now I need to search into an LDAP
database. The thing is I just want to search on the first level so I tried
using this right before the search function:
ldap_set_option($ds, LDAP_SCOPE_SUBTREE, 0);
But when I looked into the LDAP log file on my computer, this is what I
Jul 10 11:11:05 calvinold slapd: daemon: conn=692 fd=14 connection
from IP=xxx.x.x.x:xxxx (IP=0.0.0.0:xxxxx) accepted.
Jul 10 11:11:05 calvinold slapd: conn=692 op=0 BIND
Jul 10 11:11:05 calvinold slapd: conn=692 op=0 RESULT tag=97 err=0
Jul 10 11:11:05 calvinold slapd: conn=692 op=1 SRCH base="dc=company,
Jul 10 11:11:05 calvinold slapd: conn=692 op=1 SEARCH RESULT tag=101
Jul 10 11:11:05 calvinold slapd: conn=692 op=2 UNBIND
Jul 10 11:11:05 calvinold slapd: conn=-1 fd=14 closed
It's quite obvious that the scope on that search is still set to "2" (there
are 2 subtrees on my ldap database), so... why didn't the change I used
Can anyone please help me?