情報:認証とadLDAPを試みています
問題: adLDAPが「ユーザー認証に失敗しました」と表示する
質問:これを処理するものを教えてくれるエラーがない場合、どうすれば何をする必要があるかを知ることができます。
検索/試行:
- http://adldap.sourceforge.net/faq.php
- stackoverflow.com/questions/2465260/using-adldap-php-class-but-getting-error-when-looking-for-group-user-belongs-to
- adldap.sourceforge.net/wiki/doku.php?id=documentation_examples#authenticating_a_user
- http://phreek.org/blog/2011/12/enable-php-ldap-module-in-xampp
コード:
require_once(dirname(__FILE__) . '/adLDAP.php');
$adldap = new adLDAP();
$username = "user";
// $username = "domain\user"; // I have also tried
$password = "pass";
$authUser = $adldap->authenticate($username, $password);
if ($authUser == true) {
echo "User authenticated successfully";
}
else {
echo "User authentication unsuccessful";
}
echo('<hr />');
$result=$adldap->user_info("jboyle");
print_r($result);
HTML出力:
User authentication unsuccessful
Fatal error: Call to undefined method adLDAP::user_info() in C:\xampp\htdocs\adLDAP\compare.php on line 18