Bug #11343 Updated: ldap_search only does a "subtree" search

From: Date: Thu, 14 Jun 2001 20:26:29 +0000
Subject: Bug #11343 Updated: ldap_search only does a "subtree" search
Groups: php.dev 
Request: Send a blank email to php-dev+get-56859@lists.php.net to get a copy of this message
ID: 11343 Updated by: sniper Reported By: jon@myrealmail.net Old-Status: Open Status: Closed Bug Type: Feature/Change Request Operating system: PHP Version: 4.0.5 Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2001-06-07 22:05:54] jon@myrealmail.net Looking at ../etc/ldap/ldap.c: /* {{{ proto int ldap_search(int link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]]) Search LDAP tree under base_dn */ PHP_FUNCTION(ldap_search) { php_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_SUBTREE); } /* }}} */ I believe we should be able to specify the search base and not have it forced to SUBTREE. To access the SCHEMA in the directory you can do the following search with ldapsearch: ldapsearch -h 192.168.0.1 -D cn=admin,o=company -w password -s base -b cn=schema objectclass=* If you leave out the "-s base" you get this error: ldap_search: No such object Which is the same effect in PHP. Can we add an optional parameter in the ldap_search funtion to specify the search scope: one, base, subtree. I'm trying to write a tool to export the schema and display it using PHP. Any help would be appreciated. Regards, Jon. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11343&edit=2

« previous php.dev (#56859) next »