Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
From: jeanseb at au-fil-du dot net Date: Fri, 21 May 2010 15:23:53 +0000 Subject: Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-150708@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=42060&edit=1
ID: 42060
Comment by: jeanseb at au-fil-du dot net
Reported by: iarenuno at eteo dot mondragon dot edu
Summary: [PATCH] LDAP: Add pagedResults support and more
Status: Assigned
Type: Feature/Change Request
Package: Feature/Change Request
Operating System: *
PHP Version: 5CVS, 6CVS (2008-11-01)
Assigned To: patrickallaert
New Comment:
The feature is very important for us too.
I extracted the pagination feature and add some phpt from the patch of
Pierangelo and Iñaki and I ported it for the trunk.
Please find attached patch.
NB : this patch adds 2 new calls, see below
A 5.2 version of this patch is available there
http://bugs.php.net/bug.php?id=51869
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 != '');
Previous Comments:
------------------------------------------------------------------------
[2010-02-25 07:28:01] ashley at netspot dot com dot au
I used Iñaki's patch from
http://www.eteo.mondragon.edu/descargas/php-ldap/
(tested both the 5.1.6
and 5.2.10 patches) and it works very well without any issues. It
successfully pulled down 200,000+ records in a single search, using a
page size of 500.
I used this sample code as a reference for implementing the paging
functions: http://wiki.github.com/jcharaoui/mdl19-cegep/php-ldap-paging
Note: you should also check ldap_errno() and break out of the paging
loop if any error occur, because, for example, if the LDAP server goes
offline in the middle of the paging, that code gets stuck in an infinate
loop because the cookie never gets unset (happened to me).
Thanks for your work.. would love to see this included in the core
release.
------------------------------------------------------------------------
[2010-02-23 04:14:11] ashley at netspot dot com dot au
This is critical! Paged results are essential. I'm having to rewrite
some functions of my PHP app in Perl to work around this issue.. :(
------------------------------------------------------------------------
[2010-01-20 12:56:46] asp at iportalmais dot pt
Hello,
I have the same problem.
I think it's very important to add this feature, because a lot of people
can not change AD settings for security reasons.
If it's works with ASP why it not works with PHP?
------------------------------------------------------------------------
[2010-01-02 21:39:01] danhstevens at gmail dot com
Why is this patch still being overlooked? pajoye: You said there would
be a patch committed in a few days - that was well over a year ago and
as far as I can see nothing has been committed. Can we get this patch
pushed through? Is there any good reason this hasn't been implemented
yet? PLEASE tell us when to expect this patch, if ever.
------------------------------------------------------------------------
[2009-12-17 14:36:28] chris at sogetthis dot com
Who is Alexey and where is the updated patch?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=42060
--
Edit this bug report at http://bugs.php.net/bug.php?id=42060&edit=1
Thread (75 messages)
- #42060 [Opn->Asn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Asn->Fbk]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Fbk->Opn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Opn->Fbk]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [NoF->Opn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Opn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Opn->Fbk]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [NoF->Asn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Asn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
- #42060 [Asn]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Asn]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Asn->Csd]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Csd]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Csd->Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Com]: [PATCH] LDAP: Add pagedResults support and more
- Req #42060 [Fbk->Csd]: [PATCH] LDAP: Add pagedResults support and more
| « previous | php.bugs (#150708) | next » |
|---|