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

PHP ldap_read() and search base

I'm running OpenLDAP v2.0.27 and PHP/LDAP 4.1.2.

In the shell I can find the namingContexts:
----- s n i p -----
[papadoc.pts/4]$ /usr/bin/ldapsearch -x -LLL -h localhost -s base -b '' objectClass=* namingContexts
namingContexts: o=Turbo Fredriksson
----- s n i p -----

But trying to do the same in PHP, it fails:
----- s n i p -----
   Warning: LDAP: Unable to perform the search: No such object in
   /afs/bayour.com/public/web/ldap/phpQLAdmin-CVS.latest/include/pql.inc on line 45
   Can't find base dn - No such object
----- s n i p -----

The code snippet:
----- s n i p -----
            $sr = ldap_read($this->ldap_linkid, '', 'objectClass=*', array("+"));
----- s n i p -----

(exchanging + for namingContexts give the same result). Looking through
the slapd debug output (slapd -d -1) show me that slapd is searching with
a search base of 'dc=com':


Don't know why it does this however...  In slapd.conf I have suffix 
"o=Turbo Fredriksson"..