Bug #76967 [NEW]: Warning: ldap_control_paged_result_response(): No server controls in result

From: Date: Wed, 03 Oct 2018 17:13:35 +0000
Subject: Bug #76967 [NEW]: Warning: ldap_control_paged_result_response(): No server controls in result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217395@lists.php.net to get a copy of this message
From:             asears at conestogawood dot com
Operating system: Gentoo Linux
PHP version:      7.0.32
Package:          LDAP related
Bug Type:         Bug
Bug description:Warning: ldap_control_paged_result_response(): No server controls in result

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 bug report at https://bugs.php.net/bug.php?id=76967&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76967&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76967&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76967&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76967&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76967&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76967&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76967&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76967&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76967&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76967&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76967&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76967&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76967&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76967&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76967&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76967&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76967&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76967&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76967&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76967&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#217395) next »