1

LDAP サーバーに接続して、PHP を使用して OU のリストを取得したいと考えています。

    $ldaphost = "ldap://192.168.10.10";
    $ldapUsername  = "ldap_user";
    $ldapPassword = "xxxxxxxx";

    $ds = ldap_connect($ldaphost);

    if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)){
        print "Could not set LDAPv3\r\n";
    }
    else if (!ldap_start_tls($ds)) {
        print "Could not start secure TLS connection";
    } 
    else {
    // binding to the ldap server
        $bth = ldap_bind($ds, $ldapUsername, $ldapPassword) or die("\r\nCould not connect to LDAP server\r\n");
    }

コードを実行した後、次のエラーが表示されます。

LDAP_START_TLS(): UNABLE TO START TLS: SERVER IS UNAVAILABLE

コードに問題があるのか​​、サーバー構成に問題があるのか​​ わかりません!? ただし、同じ LDAP ユーザー名とパスワードを使用して AdExplorer 経由でサーバーに接続できました。

4

0 に答える 0