Req #42060 [Asn]: [PATCH] LDAP: Add pagedResults support and more

2010-05-21 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=42060&edit=1

 ID:   42060
 Updated by:   paj...@php.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
+Package:  *General Issues
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-11-01)
-Assigned To:  patrickallaert
+Assigned To:  pajoye

 New Comment:

As I said there, 5.2/3 are in bug fixes mode only. Pls provide a patch
against trunk.


Previous Comments:

[2010-05-21 17:23:52] jeanseb at au-fil-du dot net

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


[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.




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


#42060 [Asn]: [PATCH] LDAP: Add pagedResults support and more

2009-06-05 Thread pajoye
 ID:   42060
 Updated by:   paj...@php.net
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-11-01)
-Assigned To:  pajoye
+Assigned To:  patrickallaert
 New Comment:

>> get some help :)


Previous Comments:


[2008-11-16 14:57:56] paj...@php.net

Alexey has ported the patch to 5.3, it will committed in the next days.



[2008-07-17 13:00:37] ando at sys-net dot it

I didn't get any notification about this message, so I overlooked it; I
was pointed here by a user (like many others) interested in the
functionalities provided by the patch.  In the meanwhile, I noticed that
the code, after more than 2 years of inactivity, is now incompatible
with the patch.  Fixing it will require an amount of time that is
incompatible with my current schedule.  Feel free to fix it yourself. 
Cheers, p.



[2008-06-05 19:10:08] paj...@php.net

After a little discussions about windows with Howard, he pointed me to
this bug report. 

It is now the right time to apply such patch (or any other new
features) to ext/ldap as we are getting closer to the PHP 5.3 features
freeze.

Ando, do you have the time to work on it for php5.3?





[2007-09-07 18:40:25] ando at sys-net dot it

A working patch with test examples lined up to HEAD as of 5 minutes ago
is available here



I'm the original developer, and I'm willing to cooperate in integrating
it, if needed.  So you can re-open the bug now.

p.



[2007-07-21 16:08:17] j...@php.net

New features are not added in bugfix releases so this'll have to wait
til we start the 5.3 branch.



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/42060

-- 
Edit this bug report at http://bugs.php.net/?id=42060&edit=1