|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48441 ldap_search() sizelimit, timelimit and deref options persist
Submitted: 2009-05-31 21:53 UTC Modified: 2009-06-15 15:24 UTC
From: Assigned: patrickallaert (profile)
Status: Closed Package: LDAP related
PHP Version: 5.*, 6CVS (2009-06-01) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2009-05-31 21:53 UTC]
Specifiying sizelimit, timelimit and deref options in ldap_search() makes them persistent for next call to ldap_search().
// ldap_search() with sizelimit, timelimit and deref options
ldap_search($link, $dn, $filter, $attrs, 1, 1, 1, LDAP_DEREF_ALWAYS);

// Default value not used for sizelimit, timelimit and deref, previous one used.
// Returns same truncated (due to sizelimit) results as previous call
ldap_search($link, $dn, $filter, $attrs, 1);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-01 09:02 UTC]
How about not. These kind of "magic" things tend to cause bugs that are 
next to impossible to find.
 [2009-06-01 10:24 UTC]
I am not sure to understand your remark.
What I described here is the *current* way ldap_search() works.
If I'd like to set those options for all queries on the same link, I'd rather use ldap_set_option() than side effects of ldap_search().
I fixed it locally and I am about to post my patch on internals for review before commiting it to CVS (as I am rather new
 [2009-06-02 10:59 UTC]
Reopened. I misunderstood your report. :)
Note: bug fixes should go also to PHP_5_2.
 [2009-06-15 15:24 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC