This function can cause errors that might be expected to happen during ldap_connect.
As ldap_connect is - contrary to it's name - is not connecting to any server at all, usually the ldap_bind is the first command to actually hit a server and therefore can cause issues that one would not expect to happen here.