PHP Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server

前端 未结 4 612
既然无缘
既然无缘 2021-01-11 19:26

I\'ve following problem with my php script:

PHP Warning: ldap_bind(): Unable to bind to server: Can\'t contact LDAP server in ....

4条回答
  •  情话喂你
    2021-01-11 19:38

    Sometime the problem will depend of your environment(Linux, Windows...) Try to bind with one of this options:

    $connect = ldap_connect("ldap://".$ldap_server);
    $auth_user = 'CN=XXX,OU=XXX,DC=XXX,DC=com';
    $bind = ldap_bind($connect, $auth_user , $auth_pass);
    

    or

    $bind = ldap_bind($connect, 'YourDomaine\\'.$auth_user , $auth_pass);
    

提交回复
热议问题