Bug #76967 [Com]: Warning: ldap_control_paged_result_response(): No server controls in result
| From: | heiglandreas@php.net | Date: | Thu, 01 Nov 2018 07:47:07 +0000 |
| Subject: | Bug #76967 [Com]: Warning: ldap_control_paged_result_response(): No server controls in result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217782@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76967&edit=1
ID: 76967
Comment by: heiglandreas@php.net
Reported by: asears at conestogawood dot com
Summary: Warning: ldap_control_paged_result_response(): No
server controls in result
Status: Open
Type: Bug
Package: LDAP related
Operating System: Gentoo Linux
PHP Version: 7.0.32
Block user comment: N
Private report: N
New Comment:
Can you provide some more details like PHP-Version, Operating System and underlying
LDAP-Lib-version?
Previous Comments:
------------------------------------------------------------------------
[2018-10-03 17:27:12] asears at conestogawood dot com
Also, using Wireshark on the DC, I was able to verify that the pagination control was indeed sent in
the request, and a cookie *was* returned in the results.
The disconnect seems to be somewhere between PHP receiving the results and
ldap_control_paged_result_response parsing the server controls.
------------------------------------------------------------------------
[2018-10-03 17:13:35] asears at conestogawood dot com
Description:
------------
Tha pagination control does not work as expected. The server I'm connecting to is a Windows
2012 AD DC which does support pagination, but the LDAP extension does not seem to properly support
it?
Test script:
---------------
<?php
$ldap = ldap_connect('dc.example.com');
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldap, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_ALLOW);
ldap_start_tls($ldap);
ldap_bind($ldap, 'user@example.com', 'password');
$cookie = '';
do {
ldap_control_paged_result($ldap, 100, true, $cookie);
$result = ldap_search($ldap, 'DC=example,DC=com', '(primaryGroupID=513)',
['ou', 'sn', 'givenname', 'mail']);
$entries = ldap_get_entries($ldap, $result);
foreach ($entries as $e) {
echo $e['dn'] . PHP_EOL;
}
ldap_control_paged_result_response($ldap, $result, $cookie);
} while($cookie !== null && $cookie != '');
Expected result:
----------------
All of the members of GID 513 (Domain Users)
Actual result:
--------------
Stops after the first page with warning:
Warning: ldap_control_paged_result_response(): No server controls in result
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76967&edit=1