简体   繁体   English

PHP ldap_read()没有这样的对象

[英]PHP ldap_read() no such object

I can successfully bind to ldap using ldap_bind() . 我可以使用ldap_bind()成功绑定到ldap。

But when I come to do an ldap_read() using the Distinguished Name (DN) that I bound with, I get the error 但是,当我使用绑定的专有名称(DN)来执行ldap_read()时,出现了错误

No such object 没有这样的对象

For example 例如

if (ldap_bind($ldap, $dn, $password))
{
  ldap_read($ldap, $dn, '(objectclass=*)');
}
else
{
  echo "Bind failed";
}

No matter what I try as a filter, I always get this error. 无论我尝试使用什么过滤器,总是会遇到此错误。

I have solved the problem. 我已经解决了问题。 It turned out to be a permissions problem in the directory. 原来是目录中的权限问题。 The user didn't have read permission, even for their own entry. 用户没有阅读权限,即使是自己的条目也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM