doucan1996 2014-11-24 10:39
浏览 31
已采纳

使用ldap for PHP完成连接时?

I'm trying to understand PHP's ldap function in order to debug an app.

The authentication flow is like following:

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 error I get is:

The gateway did not receive a timely response from the upstream server or application.

I suspect a firewall to block the response, but I put a logger to see which statment is blocking, it's the ldap_bind one's.

If it's a network issue it should block on the ldap_connect statment shouldn't it?

  • 写回答

1条回答 默认 最新

  • dongpa9277 2014-11-24 10:57
    关注

    From the PHP documentation - http://php.net/ldap_connect:

    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().
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!