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: /cvsroot/python-ldap/python-ldap/Demo/page_control.py,v
> retrieving revision 1.4
> diff -u -r1.4 page_control.py
> --- Demo/page_control.py 8 Dec 2006 12:38:39 -0000 1.4
> +++ Demo/page_control.py 16 Mar 2009 11:33:41 -0000
> @@ -6,8 +6,9 @@
> import ldap
> from ldap.controls import SimplePagedResultsControl
>
> +ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
> ldap.set_option(ldap.OPT_REFERRALS, 0)
> -l = ldap.initialize(url)
> +l = ldap.initialize(url,trace_level=2)
> l.protocol_version = 3
> l.simple_bind_s("", "")
>
>
Thanks Michael. :)
Here is output msg:
----
$ python page_control.py
ldap_create
ldap_url_parse_ext(ldap://r6:389/)
*** ldap://r6:389/ - SimpleLDAPObject.set_option ((17, 3),{})
*** ldap://r6:389/ - SimpleLDAPObject.set_option ((17, 3),{})
*** ldap://r6:389/ - SimpleLDAPObject.simple_bind
(('cn=Manager,dc=iredmail,dc=org', 'passwd', None, None),{})
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP r6:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 192.168.122.6:389
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
=> result: 1
*** ldap://r6:389/ - SimpleLDAPObject.result3 ((1, 1, -1),{})
ldap_result ld 0x1671b300 msgid 1
ldap_chkResponseList ld 0x1671b300 msgid 1 all 1
ldap_chkResponseList returns ld 0x1671b300 NULL
wait4msg ld 0x1671b300 msgid 1 (infinite timeout)
wait4msg continue ld 0x1671b300 msgid 1 all 1
** ld 0x1671b300 Connections:
* host: r6 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 16 20:00:35 2009
** ld 0x1671b300 Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** ld 0x1671b300 Response Queue:
Empty
ldap_chkResponseList ld 0x1671b300 msgid 1 all 1
ldap_chkResponseList returns ld 0x1671b300 NULL
ldap_int_select
read1msg: ld 0x1671b300 msgid 1 all 1
read1msg: ld 0x1671b300 msgid 1 message type bind
read1msg: ld 0x1671b300 0 new referrals
read1msg: mark request completed, ld 0x1671b300 msgid 1
request done: ld 0x1671b300 msgid 1
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection 0 1
ldap_free_connection: refcnt 1
ldap_parse_result
ldap_msgfree
=> result: (97, [], 1, [])
Traceback (most recent call last):
File "page_control.py", line 24, in ?
serverctrls=[lc]
File "/usr/lib64/python2.4/site-packages/ldap/ldapobject.py", line
468, in search_ext
EncodeControlTuples(serverctrls),
File "/usr/lib64/python2.4/site-packages/ldap/controls.py", line 93,
in EncodeControlTuples
result = [
File "/usr/lib64/python2.4/site-packages/ldap/controls.py", line 45,
in getEncodedTuple
return
(self.controlType,self.criticality,self.encodeControlValue(self.controlValue))
File "/usr/lib64/python2.4/site-packages/ldap/controls.py", line 78,
in encodeControlValue
return _ldap.encode_page_control(size,cookie)
ldap.ENCODING_ERROR
ldap_free_connection 1 1
ldap_send_unbind
ldap_free_connection: actually freed
----
--
Best regards.
Zhang Huangbin
- Open Source Mail Server Solution for RHEL/CentOS 5.x:
http://code.google.com/p/iredmail/
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev