From:             jon at lightsky dot com 
Operating system: linux
PHP version:      4.3.8
PHP Bug Type:     *General Issues
Bug description:  ldap_search set to no time limit dies with a timelimit expired 
warning

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 bug report at http://bugs.php.net/?id=30017&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30017&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30017&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30017&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30017&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30017&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30017&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30017&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30017&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30017&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30017&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30017&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30017&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30017&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30017&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30017&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30017&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30017&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30017&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30017&r=mysqlcfg

Reply via email to