|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51869 LDAP pagination support
Submitted: 2010-05-20 11:37 UTC Modified: 2010-06-08 21:15 UTC
From: jeanseb at au-fil-du dot net Assigned:
Status: Duplicate Package: LDAP related
PHP Version: 5.2.13 OS:
Private report: No CVE-ID: None
 [2010-05-20 11:37 UTC] jeanseb at au-fil-du dot net
LDAP protocol v3 add the pagination feature to LDAP search.

Currently PHP doesn't support this.

Pierangelo Masarati <> and IƱaki Arenaza <> made a patch with some other features.

I extracted the pagination feature and add some phpt.

This patch is based on the PHP 5.2 branch (I will produce a trunk & php 5.3 implementation soon).

rfc2696 :
Original patch :

Test script:
$ds = ldap_connect($ldapHost, $ldapPort);

ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);

ldap_bind($ds, $ldapUser, $ldapPass);

$cookie = '';
do {
    ldap_ctrl_paged_results($ds, $pageSize, true, $cookie);

    $result = ldap_search($ds, $dn, $filter, $justthese);

    $entries = ldap_get_entries($ds, $result);

    ldap_ctrl_paged_results_resp($ds, $result, $cookie);

} while($cookie !== null && $cookie != '');


php-5.2_ldap-pagination.patch (last revision 2010-05-20 09:38 UTC by jeanseb at au-fil-du dot net)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-20 15:24 UTC]
-Status: Open +Status: Bogus
 [2010-05-20 15:24 UTC]
Duplicate request, see #42060.

Pls keep in mind that 5.2/3 are in bug fixes mode only. If you can update the patch to make it work against svn's trunk, then I can review, test and apply it.

Please post any further comments in the bug #42060.
 [2010-05-21 17:31 UTC] jeanseb at au-fil-du dot net

Thanks for your answer.
 [2010-06-08 21:15 UTC]
-Status: Bogus +Status: Duplicate
 [2010-06-08 21:15 UTC]
- marking this bug as duplicate rather than bogus.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Mar 25 17:03:44 2023 UTC