<bdo id='3f2uG'></bdo><ul id='3f2uG'></ul>

    1. <small id='3f2uG'></small><noframes id='3f2uG'>

    2. <i id='3f2uG'><tr id='3f2uG'><dt id='3f2uG'><q id='3f2uG'><span id='3f2uG'><b id='3f2uG'><form id='3f2uG'><ins id='3f2uG'></ins><ul id='3f2uG'></ul><sub id='3f2uG'></sub></form><legend id='3f2uG'></legend><bdo id='3f2uG'><pre id='3f2uG'><center id='3f2uG'></center></pre></bdo></b><th id='3f2uG'></th></span></q></dt></tr></i><div id='3f2uG'><tfoot id='3f2uG'></tfoot><dl id='3f2uG'><fieldset id='3f2uG'></fieldset></dl></div>
      <tfoot id='3f2uG'></tfoot>

    3. <legend id='3f2uG'><style id='3f2uG'><dir id='3f2uG'><q id='3f2uG'></q></dir></style></legend>

      LDAP 操作错误

      LDAP Operations error(LDAP 操作错误)
        <i id='jlbSK'><tr id='jlbSK'><dt id='jlbSK'><q id='jlbSK'><span id='jlbSK'><b id='jlbSK'><form id='jlbSK'><ins id='jlbSK'></ins><ul id='jlbSK'></ul><sub id='jlbSK'></sub></form><legend id='jlbSK'></legend><bdo id='jlbSK'><pre id='jlbSK'><center id='jlbSK'></center></pre></bdo></b><th id='jlbSK'></th></span></q></dt></tr></i><div id='jlbSK'><tfoot id='jlbSK'></tfoot><dl id='jlbSK'><fieldset id='jlbSK'></fieldset></dl></div>
        <tfoot id='jlbSK'></tfoot>
          <bdo id='jlbSK'></bdo><ul id='jlbSK'></ul>
              <tbody id='jlbSK'></tbody>

            <small id='jlbSK'></small><noframes id='jlbSK'>

            <legend id='jlbSK'><style id='jlbSK'><dir id='jlbSK'><q id='jlbSK'></q></dir></style></legend>
                本文介绍了LDAP 操作错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的 ldap 连接有问题.

                I have a problem with ldap connection.

                $hostname="ldap://sub.domain.com";
                $ds=ldap_connect($hostname, 389);
                ldap_set_option ($ds, LDAP_OPT_REFERRALS, 0) or die('Unable to set LDAP opt referrals');
                ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3) or die('Unable to set LDAP protocol version');
                
                if ($ds)
                {
                $dn = "OU=Users,OU=ro,DC=sub,DC=domain,DC=com";
                
                if (!($ldapc=ldap_bind($ds))) { 
                    echo "<p>Error:" . ldap_error($ds) . "</p>"; 
                    echo "<p>Error number:" . ldap_errno($ds) . "</p>"; 
                    echo "<p>Error:" . ldap_err2str(ldap_errno($ds)) . "</p>"; 
                    die;
                } 
                
                $attributes = array("sn");
                $filter = "(sn=*)";
                $result = ldap_search($ds, $dn, $filter, $attributes);
                
                echo $result;
                $info = ldap_get_entries($ds, $result);
                for ($i=0; $i < $info["count"]; $i++) {
                    echo $info[$i]["ou"][0];
                }
                } else {
                    echo "<h4>Unable to connect to LDAP server</h4>";
                }
                
                ldap_unbind($ds);
                

                ldap 任何匿名连接都有效,因为我在 AD 浏览器中对其进行了测试,一切都很好.在这段代码中,它停在

                The ldap any anonymous connection works because I test it in a AD browser and everything is fine. In this code it stops at

                ldap_search($ds, $dn, $filter, $attributes);
                

                我收到警告:

                警告:ldap_search(): Search: Operations error in ..index.php on line 38

                Warning: ldap_search(): Search: Operations error in ..index.php on line 38

                我真的不知道这个错误的原因是什么,感谢您的帮助.

                I don't really know what can be the cause of this error, I appreciate your help.

                推荐答案

                要将其从未答复列表中删除:

                To get it off the unanswered list:

                我发现了问题,是绑定问题.服务器接受匿名绑定但不接受搜索.和一个用户一起工作,但我犯了一个错误.对于我认为只是 de windows 的用户名而不是 AD 的所有位置的用户,现在它可以工作了.

                I found the problem, was the bind problem. The server accepts the anonymous bind but not the search. And with an user and pass worked but i was making a mistake. For user i considered just de windows's username not the all location from AD, now it works.

                这篇关于LDAP 操作错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                <tfoot id='F3Erj'></tfoot>
                    <tbody id='F3Erj'></tbody>

                1. <i id='F3Erj'><tr id='F3Erj'><dt id='F3Erj'><q id='F3Erj'><span id='F3Erj'><b id='F3Erj'><form id='F3Erj'><ins id='F3Erj'></ins><ul id='F3Erj'></ul><sub id='F3Erj'></sub></form><legend id='F3Erj'></legend><bdo id='F3Erj'><pre id='F3Erj'><center id='F3Erj'></center></pre></bdo></b><th id='F3Erj'></th></span></q></dt></tr></i><div id='F3Erj'><tfoot id='F3Erj'></tfoot><dl id='F3Erj'><fieldset id='F3Erj'></fieldset></dl></div>

                      <bdo id='F3Erj'></bdo><ul id='F3Erj'></ul>

                      <small id='F3Erj'></small><noframes id='F3Erj'>

                      • <legend id='F3Erj'><style id='F3Erj'><dir id='F3Erj'><q id='F3Erj'></q></dir></style></legend>