Hi Graham,
Thanks for your quick response.
I disabled LDAP extension into mod_php, but didn't work.
1. aptitude purge php5-ldap
2. /etc/init.d/apache2 stop && /etc/init.d/apache2 start
3. No ldap extension does not show up in phpinfo.
This is the output of ldd:
# ldd /usr/lib/python2.6/dist-packages/_ldap.so
linux-vdso.so.1 => (0x00007fffe9dff000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007fce47438000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007fce4722a000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007fce47010000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fce46df4000)
libc.so.6 => /lib/libc.so.6 (0x00007fce46a92000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007fce4687b000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007fce465d9000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fce463d5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fce4789a000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007fce461c4000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fce45fad000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0x00007fce45d35000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007fce45b31000)
# ldd /usr/lib/php5/20090626/ldap.so
linux-vdso.so.1 => (0x00007fff155ab000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007fc68b46e000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007fc68b223000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007fc68b014000)
libc.so.6 => /lib/libc.so.6 (0x00007fc68acb2000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fc68aaae000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007fc68a897000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007fc68a5f5000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fc68a3d9000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc68b89c000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007fc68a1c8000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fc689fb1000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0x00007fc689d39000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007fc689b35000)
What more could i do?
Thanks
El sábado, 30 de junio de 2012 02:39:10 UTC-4:30, Graham Dumpleton escribió:
>
> 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 view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/74RtcujMOu4J.
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.