|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33850 [PATCH]: Support LDAP connection timeouts
Submitted: 2005-07-25 08:55 UTC Modified: 2007-10-06 02:15 UTC
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:2 (50.0%)
From: simon dot kissane at mq dot edu dot au Assigned: sniper (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5CVS, 4CVS (2005-07-27) OS: *
Private report: No CVE-ID: None
 [2005-07-25 08:55 UTC] simon dot kissane at mq dot edu dot au
I have written a patch to support LDAP_X_OPT_CONNECT_TIMEOUT (which is defined by the Netscape LDAP C SDK). This required also changing ldap_connect to call ldap_init instead of ldap_open (but only if LDAP_X_OPT_CONNECT_TIMEOUT is defined), which is necessary if LDAP_X_OPT_CONNECT_TIMEOUT is to do anything. In any case, ldap_open is deprecated, so PHP shouldn't be calling it unless necessary.

Reproduce code:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-04 05:10 UTC] simon dot kissane at mq dot edu dot au
I have written a new version of this patch. This supports, as well of Netscape's LDAP_X_OPT_CONNECT_TIMEOUT, OpenLDAP's LDAP_OPT_TIMEOUT & LDAP_OPT_NETWORK_TIMEOUT. Note that these take a struct timeval, whereas Netscape takes an integer. I have chosen to represent struct timeval as an object with two properties (tv_sec & tv_usec, corresponding to the struct timeval fields of the same name.)

New version of patch (against 5.0.5) is available here:
 [2007-10-06 02:15 UTC]
I can't access that patch anymore, but I tried to implement this.
It's now added in PHP_5_3 branch and will be available in PHP 5.3.0 and above. The option is called LDAP_OPT_NETWORK_TIMEOUT in PHP scripts to allow portability regardless of what underlying ldap sdk is used.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 05:01:29 2024 UTC