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

 ID:                 42060
 Updated by:         sala...@php.net
 Reported by:        iarenuno at eteo dot mondragon dot edu
 Summary:            [PATCH] LDAP: Add pagedResults support and more
 Status:             Feedback
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   *
 PHP Version:        5CVS, 6CVS (2008-11-01)
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

The implemented functions are currently called 

"ldap_control_paged_result[_response]" but the tests try to use the plural 

"results" names.  Which are we going to keep, Scott is there any reason you 
chose 

the singular names?


Previous Comments:
------------------------------------------------------------------------
[2011-05-19 19:42:24] scott...@php.net

I applied the rename patch and tidied up the code a little.



Anything else that needs done here?

------------------------------------------------------------------------
[2011-05-19 19:41:24] scott...@php.net

Automatic comment from SVN on behalf of scottmac
Revision: http://svn.php.net/viewvc/?view=revision&revision=311264
Log: Tidy up ldap paging code and rename the API as discussed in #42060

------------------------------------------------------------------------
[2011-05-18 14:33:32] jeanseb at au-fil-du dot net

Can we expect to see ext-ldap-review.patch and api-rename.patch applied on 
trunk and PHP5.4 branch ?



Thanks.

------------------------------------------------------------------------
[2011-04-29 01:20:55] bryant dot david at gmail dot com

Hey guys,



I was not able to get the patches on this page to work, and paged results was a 
must-have for our installation. I took 

jeanseb's patch (great work by the way - thank you!) and modified it. I got it 
to work with the 5.3 build from 04/28/2011 

(over at http://snaps.php.net), but I am NOT a C developer by trade, so I'm 
very open to *constructive* criticism. 



Here's a breakdown of how to get it installed (since I just had to go through 
all this myself).



  - Obviously, you're going to be compiling PHP, so download the appropriate 
version for your platform. (again, this patch 

is for 5.3)



  - Once you've got it compiling OK, install the (attached) patch, 
paged-ldap-5.3, by doing the following (I'm on a Mac - 

you're on own if your in Windows, sorry): cd into ext/ldap in your PHP source 
directory and run 



    patch < /path/to/paged-ldap-5.3



  - Recompile



Assuming all went well, here's a modified version of jeanseb's script to test 
it:





<?php



    $ds = ldap_connect('ad.example.com');



    ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);

    ldap_bind($ds, 'CN=myaccount,OU=users,DC=ad,DC=example,DC=com', 'password');





    $pageSize    = 100;



    $cookie = '';

    do {

        ldap_control_paged_results($ds, $pageSize, true, $cookie);



        $result = ldap_search($ds, 'OU=users,DC=ad,DC=example,DC=com', 'cn=*', 
array('sAMAccountName'));

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

        

        foreach($entries as $e)

            print $e["dn"] . "\n";



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

        

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



?>



Good luck! And please, can we get paged LDAP support in some form or another 
committed?

------------------------------------------------------------------------
[2011-03-21 21:43:08] liveoutloud2day at gmail dot com

Can this be committed?  Please?  Pretty Please?



[2007-07-21 13:52 UTC] is a long time ago.  Can this get committed to code that 
can become the next version of PHP?  



This just adds optional arguments to a call that you won't use unless you know 
what you are doing.  It won't break anything else.  Can it please get committed?



Is there anything I can do to help get it committed to the trunk?



Thanks!

------------------------------------------------------------------------


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

Reply via email to