I'm trying to authenticate over LDAP against a Windows 2008 Server from a Fedora box.
The following code works from the command line (prints "Success"):
if($ldap = ldap_connect('10.0.0.101'))
{
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
$bind = ldap_bind($ldap,'administrator@domain.tld','XXXXXXX');
print ldap_error($ldap);
}
...pulling the same file via Apache/mod_php prints "Can't contact LDAP server"
I've seen a lot of reports of issues like this, but no useful information on how to resolve it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…