note 49905 added to function.ldap-search

From: Date: Fri, 11 Feb 2005 15:54:47 +0000
Subject: note 49905 added to function.ldap-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-84847@lists.php.net to get a copy of this message
PHP 4.3.10 I was trying to do an ldapsearch without a basedn. First, I tried with ' ', as suggested above, but it gave me invalid dn syntax error. ie: $sr=ldap_search($ds, ' ', $filter); Warning: ldap_search(): Search: Invalid DN syntax in ... Then I changed it to $sr=ldap_search($ds, "", $filter); Which gave me the following error: Warning: ldap_search(): Search: No such object in ... With that I then modified my ldap.conf file and commented out the BASE field #BASE dc=example, dc=com Then it worked! So it looks like if you supply a blank basedn, then it will use your default basedn in ldap.conf. ---- Manual Page -- http://www.php.net/manual/en/function.ldap-search.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49905 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49905&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49905&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49905&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49905&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49905&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49905&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84847) next »