Edit report at http://bugs.php.net/bug.php?id=42060&edit=1
ID: 42060 Updated by: johan...@php.net Reported by: iarenuno at eteo dot mondragon dot edu Summary: [PATCH] LDAP: Add pagedResults support and more Status: Closed Type: Feature/Change Request Package: *General Issues Operating System: * PHP Version: 5CVS, 6CVS (2008-11-01) Assigned To: pajoye New Comment: Quick review of the patch shows this part: switch (myargcount) { + case 4: + convert_to_string_ex(&cookie); + lcookie.bv_val = Z_STRVAL_PP(&cookie); + lcookie.bv_len = Z_STRLEN_PP(&cookie); + /* fallthru */ Why is it done this way? Shouldn't "rl|bz" in zend_parse_parameters be changed to "rl|bs"? I assume the current form will cause trouble with references and stuff which can't be converted to string (object without __toString() method) Didn't do a deeper review. As we're rolling 5.3.3 very soon i'd keep it out there for now. Previous Comments: ------------------------------------------------------------------------ [2010-06-15 21:43:55] paj...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2010-05-27 15:52:26] jeanseb at au-fil-du dot net Any feedback on the patch ? ------------------------------------------------------------------------ [2010-05-21 17:35:54] jeanseb at au-fil-du dot net http://bugs.php.net/patch-display.php?bug_id=42060&patch=php-trunk_ldap-pagination.patch&revision=latest is against trunk ------------------------------------------------------------------------ [2010-05-21 17:27:54] paj...@php.net As I said there, 5.2/3 are in bug fixes mode only. Pls provide a patch against trunk. ------------------------------------------------------------------------ [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 != ''); ------------------------------------------------------------------------ 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