#30017 [Opn->Bgs]: ldap_search set to no time limit dies with a timelimit expired warning

From: Date: Wed, 15 Sep 2004 13:20:25 +0000
Subject: #30017 [Opn->Bgs]: ldap_search set to no time limit dies with a timelimit expired warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66207@lists.php.net to get a copy of this message
ID: 30017 Updated by: sniper@php.net Reported By: jon at lightsky dot com -Status: Open +Status: Bogus Bug Type: LDAP related Operating System: linux PHP Version: 4.3.8 New Comment: RTFM: "The seventh parameter timelimit sets the number of seconds how long is spend on the search. Setting this to 0 means no limit. NOTE: This parameter can NOT override server-side preset timelimit. You can set it lower though." 1. It's 7th parameter. 2. You can NOT override any server-side limits.. Previous Comments: ------------------------------------------------------------------------ [2004-09-07 22:58:43] jon at lightsky dot com Description: ------------ I have called ldap_search with the optional time limit parameter set to 0 (documented as no limit) and I get this warning and no results. The time limit parameter is #6. PHP Warning: ldap_search(): Search: Time limit exceeded in /exports/httpd_intra/ldap_test.php I am connecting to an active directory tree. When I first started working on the search limit on Active Directory was timing out and I was getting only a sub set of the results. Since I had the search limit incresed I have started to get this warning. My work arround is to set the timeout to a very long time and all of the results are returned. But if time limit is set to 0 about half the times i get the warning and no results returned. Reproduce code: --------------- ini_set('max_execution_time',20000); $conn = ldap_connect ("ldap://$url:3268"); $filter = '(ObjectClass=*)'; $base_dn = 'DC=foo,DC=bar'; echo "<BR>ldap bind: ". (ldap_bind($conn,$user_dn,$pass) ? ' goooooooood':'bad' $sr = ldap_search($conn, $base_dn,$filter,array(),0,0,0); $info = ldap_get_entries($conn, $sr); print_r($info); Expected result: ---------------- to see gooooooooood printed at the top of the page and then the text of 53000 entries. Actual result: -------------- <BR>ldap bind: goooooooood PHP Warning: ldap_search(): Search: Time limit exceeded in /exports/httpd_intra/ldap_test.php on line 82 PHP Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in /exports/httpd_intra/ldap_test.php on line 90 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30017&edit=1

« previous php.bugs (#66207) next »