[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: PHP and ldap_search. One level only?



On Wed, Jul 10, 2002 at 11:20:14AM +0200, Jon Zubiarrain wrote:
> Hi everyone,
> 
> 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);

This is not an LDAP option, options are named LDAP_OPT_..., this is used
as a flag for ldap_search() but is meaningless in PHP. In PHP you use
ldap_list() to do one-level, and ldap_read() to get just one entry.

Better ask about such things on the PHP lists.

Stig