ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

pyldap.20.dlobue at neverbox.com pyldap.20.dlobue at neverbox.com
Thu Mar 5 13:01:36 CET 2009


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

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.


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)
>> 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.

More information about the python-ldap mailing list