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

ID: 17267
Updated by: beni@php.net
Reported By: czachary at wiley dot com
Summary: Paged Search Results
Status: Open
Type: Feature/Change Request
Package: Net_LDAP2
Operating System: Fedora 10 Linux
Package Version: 2.0.9
PHP Version: 5.3.1
Roadmap Versions:
New Comment:

https://bugs.php.net/bug.php?id=42060

Finally, with PHP 5.3 there is a paged search control available that
could be implemented in Net_LDAP2.
Currently i'm figuring out a good way to do this.


Previous Comments:
------------------------------------------------------------------------

[2010-03-26 10:00:31] beni

Hello!
PEAR Net_LDAP2 layers itself above phps ldap extension. This extension
does not export an paging mechanism, as far as i know.
The paged search control is a control that is usually set at the search
request, but php's ldap_search() function lacks an ability to provide
such controls, so im not sure wheter paged searches are suiported by
PHPs ldap-module.

Paged searches may be activated by providing general controls, please
see:
http://de.php.net/manual/de/function.ldap-set-option.php
The control for paged searches should be '1.2.840.113556.1.4.319'.

Unfortunately i did not had the time to experiment with controls - maybe
you like to assist?

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

[2010-03-25 18:49:26] czachary

Description:
------------
IS it possible to have a feature to page the searched results. This
exists in the Perl implementation of Net::LDAP, but I don't see it for
PHP.

Here are the links to the Perl Net::LDAP paging feature.

http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/Paged.pm

http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/VLV.pm

Thanks

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

Search Discussions

  • Beni at Aug 24, 2011 at 6:43 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17267&edit=1

    ID: 17267
    Updated by: beni@php.net
    Reported By: czachary at wiley dot com
    Summary: Paged Search Results
    Status: Open
    Type: Feature/Change Request
    Package: Net_LDAP2
    Operating System: Fedora 10 Linux
    Package Version: 2.0.9
    PHP Version: 5.3.1
    -Assigned To:
    +Assigned To: beni
    Roadmap Versions:
    New Comment:

    -Assigned To:
    +Assigned To: beni



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-08-24 08:38:38] beni

    https://bugs.php.net/bug.php?id=42060

    Finally, with PHP 5.3 there is a paged search control available that
    could be implemented in Net_LDAP2.
    Currently i'm figuring out a good way to do this.

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

    [2010-03-26 10:00:31] beni

    Hello!
    PEAR Net_LDAP2 layers itself above phps ldap extension. This extension
    does not export an paging mechanism, as far as i know.
    The paged search control is a control that is usually set at the search
    request, but php's ldap_search() function lacks an ability to provide
    such controls, so im not sure wheter paged searches are suiported by
    PHPs ldap-module.

    Paged searches may be activated by providing general controls, please
    see:
    http://de.php.net/manual/de/function.ldap-set-option.php
    The control for paged searches should be '1.2.840.113556.1.4.319'.

    Unfortunately i did not had the time to experiment with controls - maybe
    you like to assist?

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

    [2010-03-25 18:49:26] czachary

    Description:
    ------------
    IS it possible to have a feature to page the searched results. This
    exists in the Perl implementation of Net::LDAP, but I don't see it for
    PHP.

    Here are the links to the Perl Net::LDAP paging feature.

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/Paged.pm

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/VLV.pm

    Thanks

    ------------------------------------------------------------------------
  • Beni at Aug 24, 2011 at 6:47 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17267&edit=1

    ID: 17267
    Updated by: beni@php.net
    Reported By: czachary at wiley dot com
    Summary: Paged Search Results
    Status: Assigned
    Type: Feature/Change Request
    Package: Net_LDAP2
    Operating System: Fedora 10 Linux
    Package Version: 2.0.9
    PHP Version: 5.3.1
    Assigned To: beni
    Roadmap Versions:
    New Comment:

    sorry, its of course PHP 5.4.


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-08-24 08:44:15] beni

    -Assigned To:
    +Assigned To: beni


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

    [2011-08-24 08:38:38] beni

    https://bugs.php.net/bug.php?id=42060

    Finally, with PHP 5.3 there is a paged search control available that
    could be implemented in Net_LDAP2.
    Currently i'm figuring out a good way to do this.

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

    [2010-03-26 10:00:31] beni

    Hello!
    PEAR Net_LDAP2 layers itself above phps ldap extension. This extension
    does not export an paging mechanism, as far as i know.
    The paged search control is a control that is usually set at the search
    request, but php's ldap_search() function lacks an ability to provide
    such controls, so im not sure wheter paged searches are suiported by
    PHPs ldap-module.

    Paged searches may be activated by providing general controls, please
    see:
    http://de.php.net/manual/de/function.ldap-set-option.php
    The control for paged searches should be '1.2.840.113556.1.4.319'.

    Unfortunately i did not had the time to experiment with controls - maybe
    you like to assist?

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

    [2010-03-25 18:49:26] czachary

    Description:
    ------------
    IS it possible to have a feature to page the searched results. This
    exists in the Perl implementation of Net::LDAP, but I don't see it for
    PHP.

    Here are the links to the Perl Net::LDAP paging feature.

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/Paged.pm

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/VLV.pm

    Thanks

    ------------------------------------------------------------------------
  • Beni at Aug 24, 2011 at 6:48 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17267&edit=1

    ID: 17267
    Updated by: beni@php.net
    Reported By: czachary at wiley dot com
    Summary: Paged Search Results
    Status: Assigned
    Type: Feature/Change Request
    Package: Net_LDAP2
    Operating System: Fedora 10 Linux
    Package Version: 2.0.9
    PHP Version: 5.3.1
    Assigned To: beni
    Roadmap Versions:
    New Comment:

    Another comment for me: http://moodle.org/mod/forum/discuss.php?d=167942


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-08-24 08:48:08] beni

    sorry, its of course PHP 5.4.

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

    [2011-08-24 08:44:15] beni

    -Assigned To:
    +Assigned To: beni


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

    [2011-08-24 08:38:38] beni

    https://bugs.php.net/bug.php?id=42060

    Finally, with PHP 5.3 there is a paged search control available that
    could be implemented in Net_LDAP2.
    Currently i'm figuring out a good way to do this.

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

    [2010-03-26 10:00:31] beni

    Hello!
    PEAR Net_LDAP2 layers itself above phps ldap extension. This extension
    does not export an paging mechanism, as far as i know.
    The paged search control is a control that is usually set at the search
    request, but php's ldap_search() function lacks an ability to provide
    such controls, so im not sure wheter paged searches are suiported by
    PHPs ldap-module.

    Paged searches may be activated by providing general controls, please
    see:
    http://de.php.net/manual/de/function.ldap-set-option.php
    The control for paged searches should be '1.2.840.113556.1.4.319'.

    Unfortunately i did not had the time to experiment with controls - maybe
    you like to assist?

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

    [2010-03-25 18:49:26] czachary

    Description:
    ------------
    IS it possible to have a feature to page the searched results. This
    exists in the Perl implementation of Net::LDAP, but I don't see it for
    PHP.

    Here are the links to the Perl Net::LDAP paging feature.

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/Paged.pm

    http://search.cpan.org/~gbarr/perl-ldap-0.4001/lib/Net/LDAP/Control/VLV.pm

    Thanks

    ------------------------------------------------------------------------
  • Beni at Aug 24, 2011 at 7:05 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17267&edit=1

    ID: 17267
    Updated by: beni@php.net
    Reported By: czachary at wiley dot com
    Summary: Paged Search Results
    Status: Assigned
    Type: Feature/Change Request
    Package: Net_LDAP2
    Operating System: Fedora 10 Linux
    Package Version: 2.0.9
    PHP Version: 5.3.1
    Assigned To: beni
    Roadmap Versions:
    New Comment:

    A possible way to implement this may be like the perl interface (needs
    confirmation and deeper research):

    - Extend the params-parameter to support a "control" key that can hold a
    single control or an array of controls.
    - Create a control superclass for general control handling (so to be
    compatible to further search controls)
    - Create a paging control class, extending control base class that
    handles the paging cookie stuff
    - extend search() to pass the paging-control object to
    Net_LDAP_Search()
    - extend Net_LDAP_Search to handle search results with cookies (it looks
    like shiftEntry() and friends need to do successive searches with the
    cookie)
    That said, the actual LDAP searching code may have to be relocated from
    Net_LDAP2->search() to a new factory method inside Net_LDAP_Search.


    Usage in usercode would then be:
    - Instantiate a paging control
    - pass it in $ldap->search()
    - be happy as Net_LDAP2 deals with the rest.


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-08-24 08:48:37] beni

    Another comment for me: http://moodle.org/mod/forum/discuss.php?d=167942

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

    [2011-08-24 08:48:08] beni

    sorry, its of course PHP 5.4.

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

    [2011-08-24 08:44:15] beni

    -Assigned To:
    +Assigned To: beni


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

    [2011-08-24 08:38:38] beni

    https://bugs.php.net/bug.php?id=42060

    Finally, with PHP 5.3 there is a paged search control available that
    could be implemented in Net_LDAP2.
    Currently i'm figuring out a good way to do this.

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

    [2010-03-26 10:00:31] beni

    Hello!
    PEAR Net_LDAP2 layers itself above phps ldap extension. This extension
    does not export an paging mechanism, as far as i know.
    The paged search control is a control that is usually set at the search
    request, but php's ldap_search() function lacks an ability to provide
    such controls, so im not sure wheter paged searches are suiported by
    PHPs ldap-module.

    Paged searches may be activated by providing general controls, please
    see:
    http://de.php.net/manual/de/function.ldap-set-option.php
    The control for paged searches should be '1.2.840.113556.1.4.319'.

    Unfortunately i did not had the time to experiment with controls - maybe
    you like to assist?

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

    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://pear.php.net/bugs/bug.php?id=17267
  • Beni at Aug 24, 2011 at 10:21 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17267&edit=1

    ID: 17267
    Updated by: beni@php.net
    Reported By: czachary at wiley dot com
    Summary: Paged Search Results
    Status: Assigned
    Type: Feature/Change Request
    Package: Net_LDAP2
    Operating System: Fedora 10 Linux
    Package Version: 2.0.9
    PHP Version: 5.3.1
    Assigned To: beni
    Roadmap Versions:
    New Comment:

    There is a branch in SVN now (implementingPagedSearches_PHP5.4) that
    tries to implement this.

    I hope that the target client code boils down to something like

    ____________________________
    $pagesize = 200;
    $pagedcontrol = new Net_LDAP2_PagedResultsControl($pagesize);

    $searchparams = array(
    'scope' => ....,
    'control' => $pagedcontrol
    );
    $ldap->search(......., $searchparams);
    ... retrieve entries as usual from the search, it deals with the paging
    internally
    ____________________________


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-08-24 09:05:30] beni

    A possible way to implement this may be like the perl interface (needs
    confirmation and deeper research):

    - Extend the params-parameter to support a "control" key that can hold a
    single control or an array of controls.
    - Create a control superclass for general control handling (so to be
    compatible to further search controls)
    - Create a paging control class, extending control base class that
    handles the paging cookie stuff
    - extend search() to pass the paging-control object to
    Net_LDAP_Search()
    - extend Net_LDAP_Search to handle search results with cookies (it looks
    like shiftEntry() and friends need to do successive searches with the
    cookie)
    That said, the actual LDAP searching code may have to be relocated from
    Net_LDAP2->search() to a new factory method inside Net_LDAP_Search.


    Usage in usercode would then be:
    - Instantiate a paging control
    - pass it in $ldap->search()
    - be happy as Net_LDAP2 deals with the rest.

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

    [2011-08-24 08:48:37] beni

    Another comment for me: http://moodle.org/mod/forum/discuss.php?d=167942

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

    [2011-08-24 08:48:08] beni

    sorry, its of course PHP 5.4.

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

    [2011-08-24 08:44:15] beni

    -Assigned To:
    +Assigned To: beni


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

    [2011-08-24 08:38:38] beni

    https://bugs.php.net/bug.php?id=42060

    Finally, with PHP 5.3 there is a paged search control available that
    could be implemented in Net_LDAP2.
    Currently i'm figuring out a good way to do this.

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

    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://pear.php.net/bugs/bug.php?id=17267

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 24, '11 at 6:38a
activeAug 24, '11 at 10:21a
posts6
users1
websitepear.php.net

1 user in discussion

Beni: 6 posts

People

Translate

site design / logo © 2022 Grokbase