note 58439 deleted from function.ldap-connect by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:54:30 +0000 |
| Subject: | note 58439 deleted from function.ldap-connect by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197222@lists.php.net to get a copy of this message | ||
Note Submitter: Tony Brady
----
I don't why but on my server I am not able to connect successfully to my LDAP server unless I
use the IP address of the LDAP server, rather than the hostname. So this DOESN'T work:
<?php
$ldapconn = ldap_connect('ldap.example.com');
?>
whereas this does work:
<?php
$ip = gethostbyname('ldap.example.com');
$ldapconn = ldap_connect($ip);
?>
Of course you don't know it hasn't worked until you try to bind to the server and query
it.