高人们 帮忙
我用 ladp_bind的时候出这个错误啊.ladp_connect没有问题

解决方案 »

  1.   

    在php 里
    extension=php_ldap.dll 后面分号去掉
      

  2.   

    很可能是连接不上LDAP服务器,
      

  3.   

    你在你的php.ini中把php_ldap的函数dll前面的注释';'去掉就可以了.可参阅
    http://bbs.chinaunix.net/thread-499482-2-1.html
      

  4.   

    谢谢各位
    解决了
    dns配置错误
      

  5.   

    主机环境配置说明:openldap-2.2.29 / db-4.3.29 / openssl-0.9.8a代码:<?php$ldap_host="ldap://10.14.2.59";
    $ldap_port="389";
    $ldap_dn="cn=admin,dc=miracle,dc=com";
    $ldap_pwd="miracle";
    $ldap_conn=ldap_connect($ldap_host,$ldap_port)or die("LDAP connection failed");
    ldap_bind($ldap_conn,$ldap_dn,$ldap_pwd)or die("LDAP bind failed");
    ldap_unbind($ldap_conn)or die("LDAP unbind failed");?>错误:Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Protocol error in D:\AppServ\www\others\ldap\index.php on line 16
    LDAP bind failed解决:在slapd.conf 最后加一句:allow bind_v2原因(据openldap官网):OpenLDAP Software does not support LDAPv2 (now historic). OpenLDAP 2.x's slapd(8) can be configured to accept a version 2 LDAP Bind request, but expects requesting version 2 to speak a restricted, non-standard variant for LDAPv3 (basically LDAPv3 syntaxes and semantics in LDAPv2 PDUs). To enable this, place the following in your slapd.conf(5) file.