信息:我正在尝试验证和 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