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,'[email protected]','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.