何时使用ldap for PHP完成连接?

何时使用ldap for PHP完成连接?,php,networking,ldap,Php,Networking,Ldap,为了调试一个应用程序,我试图理解PHP的ldap函数 身份验证流程如下所示: ldap_connect($host, $port); ldap_set_option($ds, $option); ldap_bind($ds, $rdn, $pwd); ldap_search($smth); ldap_get_entries($smtgelse); ldap_close($ds); 我得到的错误是: The gateway did not receive a timely respon

为了调试一个应用程序,我试图理解PHP的ldap函数

身份验证流程如下所示:

ldap_connect($host, $port);

ldap_set_option($ds, $option);

ldap_bind($ds, $rdn, $pwd);

ldap_search($smth);

ldap_get_entries($smtgelse);

ldap_close($ds);
我得到的错误是:

The gateway did not receive a timely response from the upstream server or application.
我怀疑是防火墙阻止了响应,但我放了一个记录器来查看哪个状态被阻止,这是
ldap\u bind
one的


如果是网络问题,它应该在
ldap\u connect
station上阻塞,不是吗?

来自PHP文档-:

When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as
it does not actually connect but just initializes the connecting parameters.
The actual connect happens with the next calls to ldap_* funcs, usually with
ldap_bind().