Mac OS X ldap Server从php连接到它
|
是否有可能(我正在尝试)通过php连接到Mac OS X 10.6服务器?我的LDAP服务正在运行。
这是我尝试过的:
// using ldap bind
$ldaprdn = \'diradmin\'; // ldap rdn or dn
$ldappass = \'password\'; // associated password
// connect to ldap server
$ldapconn = ldap_connect(\"server.example.com\")
or die(\"Could not connect to LDAP server.\");
ldap_set_option( $ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3 );
if ($ldapconn) {
// binding to ldap server
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
// verify binding
if ($ldapbind) {
echo \"LDAP bind successful...\";
} else {
echo \"LDAP bind failed...\";
}
}
错误信息:
消息:ldap_bind():无法绑定到服务器:无效的DN语法
没有找到相关结果
已邀请:
2 个回复
仇聘发栖
我强烈建议使用LDAP Manager(适用于Mac)查看OS X Server的LDAP目录树。 LDAP管理器
浅镁