Authenticating to a remote LDAP SERVER
I need help.
I have been having a problem connecting to a remote LDAP Server in our
organization. I use
this code to connect to the remote LDAP server from a Red Hat Linux
Box at work:
$login = "myusername";
$pass = "mypassword";
$host = "ldaps://myldaphost.com";
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
ldap_set_option(NULL, LDAP_OPT_PROTOCOL_VERSION, 3);
$connection = ldap_connect($host,636);
echo "<br/>On Connection to <b>" . $host . "</b>: " .
ldap_error( $connection ) . "<br/>\n";
$dn = "uid=" . $login . ",dc=myorgranzation,dc=com";
$result = ldap_bind( $connection, $dn, $pass);
echo "<br/>" . ldap_error( $connection ) . "<br/>";
The result on our Corporate Red Hat Linux Box is as follows:
On Connection to ldaps://myldaphost.com: Success
Can't contact LDAP server
However when I use the SAME CODE on my Home-Based OS X Web Server I
get this result:
On Connection to ldaps://myldaphost.com: Success
Success
Aside from the OS, what else could be different? Both systems are
running Apache. Both are
running PHP 5. Why does the same code work on one machine but fail on
the other?
Any help you could offer would be greatly appreciated.
Thanks
Kofi
|