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: 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: Can we expect to see ext-ldap-review.patch and api-rename.patch applied on trunk and PHP5.4 branch ? Thanks. Previous Comments: ------------------------------------------------------------------------ [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! ------------------------------------------------------------------------ [2010-12-10 14:43:07] paj...@php.net It will be done when it is done. There is no real hurry. I was busy with other branches than trunk, in case you missed the recent releases. ------------------------------------------------------------------------ [2010-12-10 14:37:26] jeanseb at au-fil-du dot net Pierre ? ------------------------------------------------------------------------ [2010-11-24 19:35:27] jeanseb at au-fil-du dot net Good question. I tested it with TS version only. Can you test with a ts version ? ------------------------------------------------------------------------ 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