Req #51869 [NEW]: LDAP pagination support

From: Date: Thu, 20 May 2010 09:38:00 +0000
Subject: Req #51869 [NEW]: LDAP pagination support
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150648@lists.php.net to get a copy of this message
From:             
Operating system: 
PHP version:      5.2.13
Package:          LDAP related
Bug Type:         Feature/Change Request
Bug description:LDAP pagination support

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 != '');


-- 
Edit bug report at http://bugs.php.net/bug.php?id=51869&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51869&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51869&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51869&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51869&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51869&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51869&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51869&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51869&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51869&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51869&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51869&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51869&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51869&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51869&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51869&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51869&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51869&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51869&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51869&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51869&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51869&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#150648) next »