php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #25847 LDAP_OPT_NETWORK_TIMEOUT not supported
Submitted: 2003-10-12 22:34 UTC Modified: 2007-10-06 01:47 UTC
From: hedrick at rutgers dot edu Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.3.3 OS: *
Private report: No CVE-ID:
 [2003-10-12 22:34 UTC] hedrick at rutgers dot edu
Description:
------------
We have two LDAP servers, a primary and a backup. PHP 
scripts can't use the backup in any useful way. If the 
primary is down, the timeout is 180 sec. The user will 
have given up long before then.

Openldap has an option LDAP_OPT_NETWORK_TIMEOUT that 
applies to the connect. You need to add this to the 
list of options that can be set with ldap_set_option. 
Sun (which I assume means Netscape) has an equivalent, 
LDAP_X_OPT_CONNECT_TIMEOUT. However I think people 
build with openldap often enough that even supporting 
just the openldap version would be a big help.

Another approach would be to allow arbitrary values for 
ldap_set_option, so you don't have to hard-code all 
possible value.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-20 15:52 UTC] philippe dot marasse at ac-poitiers dot fr
It seems that in both PHP 4.4.4 & PHP 5.1.6, the problem still exists. So I wrote a little patch to support only this feature (initially against PHP 5.1.4).

You download the patch here :

http://admin.vienneinfo.org/files/ldap.c-patch-network-timeout-5.1.4.patch
 [2007-10-06 01:47 UTC] jani@php.net
Added in PHP_5_3 branch and above. This will not be merged to PHP 4 (discontinued already)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 01:02:05 2014 UTC