note 70704 rejected from function.ldap-connect by betz
| From: | betz@php.net | Date: | Tue, 24 Oct 2006 16:34:20 +0000 |
| Subject: | note 70704 rejected from function.ldap-connect by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119077@lists.php.net to get a copy of this message | ||
Note Submitter: sami at sipponen dot com
----
After struggling tens of hours I managed to figure out why I couldnât make forest wide searches
from our AD. I did know that I have to use global catalog (port 3268) to be able to do this and so I
thought that I was using.
However it turned out that at least PHP 5.1.x running on Windows donât support the second
parameter to ldap_connect. I didnât receive any error even I gave the port number to it. It
simply didnât use that value at all. The solution was to add the port number to the host
string:
$adConn = ldap_connect('ldap://mydc.mycompany.com:3268');
After this I was able to do domain wide searches and regained my lost sanity (hopefully). :-)