Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-18 Thread Michael Ströder
Zhang Huangbin wrote: > > A personal question: Cc: to the list since this could be of general interest. > when will you release a new version? It would be no big deal to release a new version tonight if it's important for your project to use a released version with a definite version number you

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-17 Thread Zhang Huangbin
Michael Ströder wrote: > Aargh! My fault. Thanks David. > Modules/ldapcontrol.c in CVS HEAD should work now. Tested and it *WORKS* now, Thanks David & Michael. :) -- Best regards. Zhang Huangbin - Open Source Mail Server Solution for RHEL/CentOS 5.x: http://code.google.com/p/iredmail/

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-17 Thread Michael Ströder
Michael Ströder wrote: > Zhang Huangbin wrote: >> Michael Ströder wrote: >>> This patch seems to work (already installed at your site ;-). >>> >> Something strange. >> >> The server your tested is CentOS 5.2 x86_64, and it works with your >> patched version. >> >> But on RHEL 5.3 x86_64, it raises

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-17 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> This patch seems to work (already installed at your site ;-). >> > Something strange. > > The server your tested is CentOS 5.2 x86_64, and it works with your > patched version. > > But on RHEL 5.3 x86_64, it raises ldap.NO_MEMORY error: Are you s

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision 1

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Thanks to Zhang Huangbin for giving me access to his machine for testing. >> So I could track it down. It seems to work with the patch below which I >> committed to CVS HEAD. > > Hi, Michael. Thanks for your quick response and hard work :) > > But

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > Thanks to Zhang Huangbin for giving me access to his machine for testing. > So I could track it down. It seems to work with the patch below which I > committed to CVS HEAD. Hi, Michael. Thanks for your quick response and hard work :) But i got new error (ldap.NO_MEMORY) h

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Could somebody with more knowledge of C programming please review >> function encode_rfc2696() in Modules/ldapcontrol.c? >> >> The following var declaration could be problematic on 64-bit systems: >> >> unsigned long size; Thanks to Zhang Huang

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Could somebody with more knowledge of C programming please review >> function encode_rfc2696() in Modules/ldapcontrol.c? >> >> The following var declaration could be problematic on 64-bit systems: >> >> unsigned long size; >> >> Another issue co

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > Could somebody with more knowledge of C programming please review > function encode_rfc2696() in Modules/ldapcontrol.c? > > The following var declaration could be problematic on 64-bit systems: > > unsigned long size; > > Another issue could be in decode_rfc2696() (whic

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Michael Ströder wrote: > Zhang Huangbin wrote: >> Michael Ströder wrote: >>> To all of the people experiencing problems: >>> Could you please run Demo/page_control.py after applying the attached >>> patch (which enables debug logging). >> Here is output msg: > > So this seems to boil down to that

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > So this seems to boil down to that the following commands (lines > wrapped) would fail at your site instead of returning the encoded > control tuple: > > import ldap from ldap.controls import SimplePagedResultsControl > SimplePagedResultsCont

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> To all of the people experiencing problems: >> Could you please run Demo/page_control.py after applying the attached >> patch (which enables debug logging). > > Here is output msg: So this seems to boil down to that the following commands (lines w

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > To all of the people experiencing problems: > Could you please run Demo/page_control.py after applying the attached > patch (which enables debug logging). > > Index: Demo/page_control.py > === > RCS file: /cvsr

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > I had the same error here while run Demo/page_control.py: To all of the people experiencing problems: Could you please run Demo/page_control.py after applying the attached patch (which enables debug logging). To preclude problems in the 64-bit build of OpenLDAP client lib

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Zhang Huangbin wrote: >> Strange, the same code (Demo/page_control.py) works in: >> >> - OS: CentOS 5.2, *i386* >> - Python: 2.4.3-21.el5 (shipped within CentOS) >> - python-ldap: 2.3.6 (installed from source tarball) >> - OpenLDAP: 2.3.27-8.el5_2.4 >> > How can i help devel

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-15 Thread Zhang Huangbin
Zhang Huangbin wrote: > Strange, the same code (Demo/page_control.py) works in: > > - OS: CentOS 5.2, *i386* > - Python: 2.4.3-21.el5 (shipped within CentOS) > - python-ldap: 2.3.6 (installed from source tarball) > - OpenLDAP: 2.3.27-8.el5_2.4 > How can i help developers fix this possible bug? Plea

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-15 Thread Zhang Huangbin
Strange, the same code (Demo/page_control.py) works in: - OS: CentOS 5.2, *i386* - Python: 2.4.3-21.el5 (shipped within CentOS) - python-ldap: 2.3.6 (installed from source tarball) - OpenLDAP: 2.3.27-8.el5_2.4 -- Best regards. Zhang Huangbin - Open Source Mail Server Solution for RHEL/Cent

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-15 Thread Zhang Huangbin
I had the same error here while run Demo/page_control.py: Traceback (most recent call last): File "1.py", line 23, in ? serverctrls=[lc] File "/usr/lib64/python2.4/site-packages/python_ldap-2.3.6-py2.4-linux-x86_64.egg/ldap/ldapobject.py", line 501, in search_ext_s msgid = sel

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl (pyldap: message 1 of 20)

2009-03-06 Thread pyldap . 20 . dlobue
Michael, I will try as you suggested and will compile the current versions of openldap, python-ldap, cyrus-sasl, and openssl without any patches and default options. I'll let you know how that turns out. To respond to your point that you don't know what build options are used, or what patches app

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-05 Thread Michael Ströder
pyldap.20.dlo...@neverbox.com wrote: > > I've run into the same problem as Joel on basically an identical setup > - CentOS 5.2, openldap 2.3.27-8.el5_2.4, python 2.4.3-21.el5, > python-ldap 2.2.0-2.1. This of course being on a 64 bit release of > CentOS. > > I did as you suggested and updated ope

RE: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-05 Thread pyldap . 20 . dlobue
Michael, I've run into the same problem as Joel on basically an identical setup - CentOS 5.2, openldap 2.3.27-8.el5_2.4, python 2.4.3-21.el5, python-ldap 2.2.0-2.1. This of course being on a 64 bit release of CentOS. I did as you suggested and updated openldap to 2.4.12-1, and python-ldap to 2.3.

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-03 Thread Russell Jackson
Michael Ströder wrote: > It seems you're running on a 64-bit platform. I did never test > python-ldap on such a system. Which version of python-ldap is it? Did > you compile it yourself? Which versions of OpenLDAP libs are used? > Just as a data point, I've been running python-ldap (from ports) o

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-03 Thread Michael Ströder
Joel Heenan wrote: > Hi Michael, > > Comments inline: > >> Michael Ströder wrote: >> Joel Heenan wrote: >> >>> File "/usr/lib64/python2.4/site-packages/ldap/controls.py", line >> 78, >>> in encodeControlValue >>> >>> return _ldap.encode_page_control(size,cookie) >>> >>> ldap.ENCODING_ERROR

RE: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-03 Thread Joel Heenan
Hi Michael, Comments inline: > Michael Ströder wrote: > Joel Heenan wrote: > > > File "/usr/lib64/python2.4/site-packages/ldap/controls.py", line > 78, > > in encodeControlValue > > > > return _ldap.encode_page_control(size,cookie) > > > > ldap.ENCODING_ERROR > > It seems you're running on

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-03 Thread Michael Ströder
Joel Heenan wrote: > > I'm trying to use SimplePagedResultsControl so I can pull some data out > of Active Directory that has a Server-Limit set. I got most of my code > from this guide http://www.novell.com/coolsolutions/tip/18274.html Since I posted this code I think it works. ;-) > File "/u

ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-02 Thread Joel Heenan
I'm trying to use SimplePagedResultsControl so I can pull some data out of Active Directory that has a Server-Limit set. I got most of my code from this guide http://www.novell.com/coolsolutions/tip/18274.html When I try and run it I get this dump: """ SimplePagedResultsControl(1.2.840.113556.1