Re: openldap, php and "no such object" error msg
| From: | (Richard Lynch) | Date: | Tue, 04 Jul 2000 00:23:49 +0000 |
| Subject: | Re: openldap, php and "no such object" error msg | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4616@lists.php.net to get a copy of this message | ||
In article <Pine.LNX.4.21.0006292245220.7495-100000@bigbang.wdev.net>,
nallan@wdev.net (Nick Allan) wrote:
> Hi all
> I'm running openldap and php 4.0 and am getting an error when trying to
> use the ldap_search function
> The error message is "No such object"
> using the ldapsearch client works perfectly
> ldapsearch -b 'o=wdev,c=AU' 'cn=test'
> returns an entry.
> but
> $ds = ldap_connect("localhost");
> ldap_bind($ds);
> $sr = ldap_search($ds, "o=wdev,c=AU", "cn=test");
> returns the error msg "no such object"
> according to php the connect and bind were successful.
>
> anyone got any ideas on what I'm missing here?
Assuming ldap_connect() and ldap_bind() return 0 for failure, add:
... or die("Could not connect");
... or die("Could not bind");
in there.
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)