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.5-1, but I still received the exact same error.

Because you mentioned that you had never tested python-ldap on a 64
bit machine, I duplicated my setup in a VirtualBox VM only using a
i686 release of CentOS rather than x64.

I ran my python program using the old versions of software ( openldap
2.3.27-8.el5_2.4, python 2.4.3-21.el5, python-ldap 2.2.0-2) and it ran
without any problems whatsoever.

Any suggestions on how to fix this?

Let me know if you need any other info.

Dominic

-
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
>> 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?
>
> I am using 64-bit RPM's compiled by RedHat for RHEL5.2 . The 32-bit
> variants are installed I'll see if I can work out how to force it to
> use them.
>
> Here are the versions involved, but be aware RedHat versions include
> backporting so it can be difficult to say exactly what is included:
>
> openldap-2.3.27-8.el5_1.3
> openldap-devel-2.3.27-8.el5_1.3
> python-ldap-2.2.0-2.1

These releases are old:
OpenLDAP 2.3.27 was released 2006-08-19
python-ldap 2.2.0 was released 2006-04-10

There have been numerous bug fixes to both packages since then. While I
don't have a 64-bit box myself there were several related fixes
contributed and tested by others. So I suggest to build recent releases
of both from source and test with that.

>>> Server is RHEL5.2
>> Hmm, isn't this quite old? I'd guess old versions of python-ldap and
>> OpenLDAP are shipped with this release.
>
> Err RHEL5.2 is the latest stable I believe.

Whatever stable means to Red Hat for these particular packages. Sorry,
if you insist on using these ancient versions I have to point you to Red
Hat's support.

Ciao, Michael.


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-05 Thread Michael Ströder
[email protected] 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 openldap to 2.4.12-1, and
> python-ldap to 2.3.5-1, but I still received the exact same error.

The problem with using binary packages is that I never know whether
patches were applied by the distributor and which build parameters were
used.

Also note there's python-ldap with some minor build fixes and OpenLDAP
2.4.15 with numerous fixes to libldap. OpenLDAP developers will likely
not give support with this issue if the problem cannot be reproduced
with recent code.

> Because you mentioned that you had never tested python-ldap on a 64
> bit machine, I duplicated my setup in a VirtualBox VM only using a
> i686 release of CentOS rather than x64.
> 
> I ran my python program using the old versions of software ( openldap
> 2.3.27-8.el5_2.4, python 2.4.3-21.el5, python-ldap 2.2.0-2) and it ran
> without any problems whatsoever.

Thanks for testing this.

> Any suggestions on how to fix this?

At the moment I have no idea how to proceed. I'd suggest to build from
source. Not sure about compiler woes on that platform. E.g. try turning
off optimization (with option -O0) when building from source.

Ciao, Michael.

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev