php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jeanseb at au-fil-du dot net
New email:
PHP Version: OS:

 

 [2010-05-20 11:37 UTC] jeanseb at au-fil-du dot net
Description:
------------
LDAP protocol v3 add the pagination feature to LDAP search.

Currently PHP doesn't support this.

Pierangelo Masarati <ando@OpenLDAP.org> and IƱaki Arenaza <iarenuno@eteo.mondragon.edu> 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 : http://www.ietf.org/rfc/rfc2696.txt
Original patch : http://www.eteo.mondragon.edu/descargas/php-ldap/diff-php-src-5-2-12.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 != '');


Patches

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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-20 15:24 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-05-20 15:24 UTC] pajoye@php.net
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
Done. 

http://bugs.php.net/bug.php?id=42060

Thanks for your answer.
 [2010-06-08 21:15 UTC] srinatar@php.net
-Status: Bogus +Status: Duplicate
 [2010-06-08 21:15 UTC] srinatar@php.net
- marking this bug as duplicate rather than bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Apr 02 00:01:32 2025 UTC