Please ensure you reply to the same message properly. You keep creating new 
messages which destroys the discussion thread.

On 30/07/2013, at 5:24 PM, virgil.balibanu <[email protected]> wrote:

> 1. 
> [root@vps701 sbo]# locate mod_wsgi.so
> /usr/lib/httpd/modules/mod_wsgi.so
> [root@vps701 sbo]# ldd /usr/lib/httpd/modules/mod_wsgi.so
>     libpthread.so.0 => /lib/libpthread.so.0 (0xb7d30000)
>     libdl.so.2 => /lib/libdl.so.2 (0xb7d2b000)
>     libutil.so.1 => /lib/libutil.so.1 (0xb7d27000)
>     libm.so.6 => /lib/libm.so.6 (0xb7cfe000)
>     libc.so.6 => /lib/libc.so.6 (0xb7ba5000)
>     /lib/ld-linux.so.2 (0xb7f29000)
> 
> It does not specify which python it is compiled for, but the site runs django 
> and django is installed for python2.7 not 2.4(default) so it is ok

And that is possibly part of your problem. It is a bad idea to be linking with 
a static Python library as it can cause various issue.

You should reinstall your Python version and this time use the --enable-shared 
option to the 'configure' script when building Python from source code. Make 
sure you start from fresh source directory or do a 'make distclean' before 
running configure.

See:

http://code.google.com/p/modwsgi/wiki/InstallationIssues#Lack_Of_Python_Shared_Library

for details of this problem.

Now. The next problem likely is that you also have a Python 2.7 installed 
globally on your system under /usr. At run time, it is likely finding that 
Python installation and not using the one under /usr/local. To get around that 
you need to tell mod_wsgi where the Python installation is.

See:

http://code.google.com/p/modwsgi/wiki/InstallationIssues#Multiple_Python_Versions

In summary.

1. Reinstall your Python from fresh source code under /usr/local with 
--enable-shared used to configure script of Python configure script when 
installing it. So at least:

./configure --prefix=/usr/local --enable-shared
make
sudo make install

2. Rebuild mod_wsgi from fresh source code where --with-python gives the Python 
under /usr/local. When doing this, ensure that setting LD_RUN_PATH so knows to 
get shared library from /usr/local/lib.

./configure --with-python=/usr/local/bin/python2.7
LD_RUN_PATH=/usr/local/lib make 
sudo make install

3. Tell mod_wsgi at run time to use the Python under /usr/local.

WSGIPythonHome /usr/local

Graham

> 2
> sys.version = '2.7.2 (default, Oct 20 2011, 14:51:08) \n[GCC 4.1.2 20080704 
> (Red Hat 4.1.2-51)]'
> sys.prefix = '/usr/local'
> 
> 3.
> mod_wsgi.process_group = ''
> mod_wsgi.application_group = 'vps701.openvps.eu|'
> 
> In the apache configuration for mod_wsgi I have just this:
> WSGIPassAuthorization On
> WSGIScriptAlias / /home/projects/sbo/django.wsgi
> 
> Thanks,
> Virgil
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to