On 11 November 2011 07:37, Chip Burke <[email protected]> wrote:
> mod_python is not on this box.
>
> The compile of mod_wsgi was based on ./configure --with-python=/usr/
> local/bin/python
>
> As for the script, I can;t see how as it is stupid simple:
>
> import sys
>
> def application(environ, start_response):
>    status = '200 OK'
>    output = 'Hello World!'
>
>    response_headers = [('Content-type', 'text/plain'),
>                        ('Content-Length', str(len(output)))]
>    start_response(status, response_headers)
>
>    print >> sys.stderr, 'sys.prefix = %s' % repr(sys.prefix)
>    print >> sys.stderr, 'sys.path = %s' % repr(sys.path)

The two lines above are producing it.

If you aren't requesting URLs, something else is, check the Apache
access log to see what URLs are being accessed.

Graham

>    return [output]
>
>
> On Nov 10, 3:28 pm, Graham Dumpleton <[email protected]>
> wrote:
>> Are you sure that is not coming from your own WSGI script file?
>>
>> Seems the debug for mismatched Python versions was removed back before
>> mod_wsgi 3.0.
>>
>> Also, make sure you aren't loading mod_python into same Apache.
>>
>> Graham
>>
>> On 11 November 2011 07:17, Chip Burke <[email protected]> wrote:
>>
>> > [root@testing modules]# ldd mod_wsgi.so
>> >        libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0
>> > (0x00002b2d2124c000)
>> >        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b2d21616000)
>> >        libdl.so.2 => /lib64/libdl.so.2 (0x00002b2d21831000)
>> >        libutil.so.1 => /lib64/libutil.so.1 (0x00002b2d21a36000)
>> >        libm.so.6 => /lib64/libm.so.6 (0x00002b2d21c39000)
>> >        libc.so.6 => /lib64/libc.so.6 (0x00002b2d21ebc000)
>> >        /lib64/ld-linux-x86-64.so.2 (0x000000366e000000)
>>
>> > There should not be a system wide Python 2.7 shared lib as the system
>> > build is 2.4.
>>
>> > As for the Apache error, I am not sure what else to give you. Here are
>> > two instances:
>>
>> > [Thu Nov 10 14:38:31 2011] [error] sys.prefix = '/usr/local'
>> > [Thu Nov 10 14:38:31 2011] [error] sys.path = ['/usr/local/lib/
>> > python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/
>> > python2.7/site-packages/pip-0.8.2-py2.7.egg', '/usr/local/lib/
>> > python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/
>> > plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/
>> > python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/
>> > local/lib/python2.7/site-packages']
>> > [Thu Nov 10 15:16:05 2011] [error] sys.prefix = '/usr/local'
>> > [Thu Nov 10 15:16:05 2011] [error] sys.path = ['/usr/local/lib/
>> > python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/
>> > python2.7/site-packages/pip-0.8.2-py2.7.egg', '/usr/local/lib/
>> > python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/
>> > plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/
>> > python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/
>> > local/lib/python2.7/site-packages']
>>
>> > On Nov 10, 3:09 pm, Graham Dumpleton <[email protected]>
>> > wrote:
>> >> You haven't included the whole message from Apache error log. There
>> >> should be a warning there about Python mismatch. What is the message?
>>
>> >> For mod_wsgi, did you actually compile it from source against Python
>> >> in /usr/local?
>>
>> >> Run:
>>
>> >>   ldd mod_wsgi.so
>>
>> >> on the Apache mod_wsgi.so file.
>>
>> >> If you did compile against your own Python, you likely haven't done
>> >> enough to ensure its shared library is used and so still using system
>> >> wide Python 2.7 shared library.
>>
>> >> Need to see full messages from error log and ldd output to help further.
>>
>> >> Graham
>>
>> >> On 11 November 2011 06:08, Chip Burke <[email protected]> wrote:
>>
>> >> > I should add I am using a non system Python install so have included
>> >> > this in the httpd.conf
>>
>> >> > WSGIPythonHome /usr/local
>>
>> >> > I tried adding:
>>
>> >> > WSGIPythonPath /usr/local/lib/python2.7/site-packages
>>
>> >> > but that changed nothing.
>>
>> >> > When I add 'import cherrypy' to the Hello World, it finds the package.
>>
>> >> > On Nov 10, 1:52 pm, Chip Burke <[email protected]> wrote:
>> >> >> I *think* I have everything working correctly as the Hello World
>> >> >> script on the INstallProblem page is now loading. However, I am
>> >> >> getting a ton of errors in the Apache logs like this:
>>
>> >> >> [Thu Nov 10 13:45:06 2011] [error] sys.prefix = '/usr/local'
>> >> >> [Thu Nov 10 13:45:06 2011] [error] sys.path = ['/usr/local/lib/
>> >> >> python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/
>> >> >> python2.7/site-packages/pip-0.8.2-py2.7.egg', '/usr/local/lib/
>> >> >> python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/
>> >> >> plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/
>> >> >> python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/
>> >> >> local/lib/python2.7/site-packages']
>>
>> >> >> How do I fix this?
>>
>> >> > --
>> >> > 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 
>> >> > athttp://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 
>> > athttp://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.
>
>

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