Try disabling any LDAP extensions being loaded into mod_php. Likely
the LDAP extension in PHP is linking a different version of some
shared library than whatever Python LDAP client library you are using.

Run 'ldd' on the PHP LDAP extension and Python LDAP client C extension
.so files to see what libraries and versions they are trying to use.

Graham

On 30 June 2012 11:17, Eduardo Gonzalez <[email protected]> wrote:
> Hi,
>
> When I try to use the ldap.set_option from ldap module is throwing an error.
>
> Here's the traceback:
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145] mod_wsgi
> (pid=26699): Exception occurred processing WSGI script
> '/var/www/wsgihandler.py'.
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145] Traceback (most
> recent call last):
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]   File
> "/var/www/wsgihandler.py", line 4, in application
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]
> ldap.set_option( ldap.OPT_REFERRALS, 0 )
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]   File
> "/usr/local/lib/python2.6/dist-packages/python_ldap-2.4.10-py2.6-linux-x86_64.egg/ldap/functions.py",
> line 132, in set_option
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]     return
> _ldap_function_call(None,_ldap.set_option,option,invalue)
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]   File
> "/usr/local/lib/python2.6/dist-packages/python_ldap-2.4.10-py2.6-linux-x86_64.egg/ldap/functions.py",
> line 63, in _ldap_function_call
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145]     result =
> func(*args,**kwargs)
> [Fri Jun 29 20:18:33 2012] [error] [client 167.134.223.145] SystemError:
> error 89 from ldap_set_option
>
> Here's wsgi script:
> def application(environ, start_response):
>     import ldap
>     import ldap.filter
>     ldap.set_option( ldap.OPT_REFERRALS, 0 )
>     status = '200 OK'
>     output = 'Hello World!'
>
>     response_headers = [('Content-type', 'text/plain'),
>                         ('Content-Length', str(len(output)))]
>     start_response(status, response_headers)
>
>     return [output]
>
> My system:
> Debian 6.0.5
> Python 2.6.6
> Apache 2.2.16
> WSGI 3.3
> PHP 5.3.3
>
> If mod_php is off the script works OK. I need mod_php and mod_wsgi running
> together.
>
> Any help much aprreciated.
>
> Eduardo Gonzalez.
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/UzI3yeVshHYJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to