服务器是不愿意执行。 LDAP在PHP [英] Server is unwilling to perform. LDAP in PHP

查看:2139
本文介绍了服务器是不愿意执行。 LDAP在PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是得到这个错误

服务器是不愿意执行

和我的code是下一个:

and my code is the next:

   echo "Checking ...";
    $username = $_POST["username"];
    $passwd = $_POST["passwd"];
    $host              = 'myhost.co.uk'; 
    $port              = 389; 
    $dn                = 'uid='.$username.',cn=nssproxy,ou=users,dc=co,dc=uk';

   // conexion a ldap

    $conn = ldap_connect( "ldap://".$host.":389") ;

    ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
    ldap_set_option($conn, LDAP_OPT_REFERRALS, 0);

    // match de usuario y password
    $bind = ldap_bind( $conn, $dn, $password );


    if ($bind){
        echo "OK";
    }
    else {
        echo "NO OK";
    }
    echo ldap_error($conn);

为什么我有这样的错误?我总是与任何用户进行测试,这个脚本返回相同的错误。

Why I have this error? I'm always testing with any user, this script return same error.

先谢谢了。

推荐答案

所以,我搜索谷歌为服务器是不愿意执行键,第一个结果说:

So I searched Google for Server is unwilling to performand the first result says:

C.1.4。 ldap_ *:服务器是不愿意执行

C.1.4. ldap_*: server is unwilling to perform

的slapd将返回一个不愿意执行错误,如果后端持有目标条目不支持给定的操作。

slapd will return an unwilling to perform error if the backend holding the target entry does not support the given operation.

密码后端只愿意执行搜索。它会返回一个不愿意为所有其他操作执行错误。

The password backend is only willing to perform searches. It will return an unwilling to perform error for all other operations.

的壳后端是可配置的,并且可以支持的操作的一个有限子集。检查指示由目录服务器所需的资源短缺其他错误。即你可能有一个完整的磁盘等

The shell backend is configurable and may support a limited subset of operations. Check for other errors indicating a shortage of resources required by the directory server. i.e. you may have a full disk etc

<一个href=\"http://stackoverflow.com/questions/10763070/ldap-mod-replace-function-ldap-mod-replace-modify-server-is-unwilling-to-p\">ldap_mod_replace() [function.ldap-MOD替换]:修改:服务器是不愿意执行有一定的要求,以及

这篇关于服务器是不愿意执行。 LDAP在PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆