Hi,
I have small problem with the ldap_connect() function, it is causing a 2.5-2.7 second delay every time it is called. What is strange is that anything can be passed as an argument, an LDAP server, or just a string of text, as the connection actually occurs at the ldap_bind() stage. The web server is run on a domain controller, so the LDAP server is local. Connecting to the LDAP server from a client machine does not produce a delay.
I've isolated the problem to PHP (versions 4.4.4, 4.4.7 and 5.2.3 are affected), as the same results can be reproduced with any LDAP server (or random text) and the server machine. Using PHP on other machines, or Python on the server are not affected by this.
Can anyone recommend any way to get some debug output from the ldap_connect() function?