On Jan 19, 8:07 pm, Graham Dumpleton <[email protected]>
wrote:
> If you add in the hello world WSGI script file at global scope, ie.,
> outside of application function:
>
> import sys
> import socket
>
> does it still work?
No (!). It gives me the same error as the Django app does.
>
> Post the portions of Apache configuration you are using to setup WSGI
> application?
>
While we have been working on this, I managed to port this application
to another machine, running NetBSD 5.0
and Apache/2.2.9 (Unix) mod_ruby/1.2.6 Ruby/1.8.6(2008-03-03) mod_ssl/
2.2.9 OpenSSL/0.9.8e DAV/2 mod_wsgi/2.5 Python/2.6.2 PHP/5.2.6
So I made some modifications to the way I have the apps set up on my
PPC Apple PowerBook, more or less duplicating the successful setup of
the NetBSD machine.
The results are the same as before, so I'll give you my current
configuration, even though it's not exactly the same as when I first
posted. There may be some unnecessary things, but here are the Apache
settings:
WSGIScriptAlias /helloworld /usr/local/apps/test//helloworld.wsgi
WSGIScriptAlias /djvocab /usr/local/apps/djvocab/apache/django.wsgi
<Directory /usr/local/apps/djvocab/apache>
Order deny,allow
Allow from all
</Directory>
<Directory /usr/local/apps/djvocab>
Order deny,allow
Allow from all
</Directory>
> If not doing so already, try setting:
>
> WSGIApplicationGroup %{GLOBAL}
>
> and try Django again.
I'm not sure where I should set that.
>
> For good measure, send output of:
>
> file .libs/mod_wsgi.so
file /sw/lib/apache2/modules/mod_wsgi.so
/sw/lib/apache2/modules/mod_wsgi.so: Mach-O bundle ppc
>
> and indicate whether you are on a 64 bit PPC machine.
You've got me here: I'm not sure, but I think the G4 PPC is a 32-bit
processor. WikiPedia says the G4 was 32-bit: the G5 was 64-bit.
Here's the output of uname -a:
Darwin iota.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10
18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh
powerpc
>
> Graham
>
> 2010/1/19 fhuddles <[email protected]>:
>
>
>
>
>
> >> Suggest you do the following.
>
> >> 1. Use a simple WSGI hello world program and not your Django instance
> >> to test. See:
>
> >> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
> >> 2. Change LogLevel directive in Apache configuration to be:
>
> >> LogLevel info
>
> >> 3. Verify that all files/directories under:
>
> >> /Library/Frameworks/Python.framework
>
> >> are in fact readable/searchable by others and that they don't have
> >> restrictive permissions which would prevent the user that Apache runs
> >> as from reading them.
>
> >> Graham
>
> > OK, I did that: the "helloworld.wsgi" program runs fine. django.wsgi
> > still does not.
> > Here's what the error log looks like for the two, with LogLevel info:
>
> > [Tue Jan 19 00:09:10 2010] [notice] Apache/2.2.9 (Unix) PHP/5.2.6
> > mod_wsgi/3.1 Python/2.6.4 configured -- resuming normal operations
> > [Tue Jan 19 00:09:10 2010] [info] Server built: May 6 2009 00:48:53
> > [Tue Jan 19 00:09:10 2010] [info] mod_wsgi (pid=13077): Initializing
> > Python.
> > [Tue Jan 19 00:09:10 2010] [info] mod_wsgi (pid=13073): Initializing
> > Python.
> > [Tue Jan 19 00:09:10 2010] [info] mod_wsgi (pid=13074): Initializing
> > Python.
> > [Tue Jan 19 00:09:10 2010] [info] mod_wsgi (pid=13075): Initializing
> > Python.
> > [Tue Jan 19 00:09:10 2010] [info] mod_wsgi (pid=13076): Initializing
> > Python.
> > [Tue Jan 19 00:09:12 2010] [info] mod_wsgi (pid=13075): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:12 2010] [info] mod_wsgi (pid=13074): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:12 2010] [info] mod_wsgi (pid=13077): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:12 2010] [info] mod_wsgi (pid=13076): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:12 2010] [info] mod_wsgi (pid=13073): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:25 2010] [info] mod_wsgi (pid=13103): Initializing
> > Python.
> > [Tue Jan 19 00:09:25 2010] [info] mod_wsgi (pid=13075): Create
> > interpreter 'localhost|/helloworld'.
> > [Tue Jan 19 00:09:25 2010] [info] [client ::1] mod_wsgi (pid=13075,
> > process='', application='localhost|/helloworld'): Loading WSGI script
> > '/Users/fhuddles/work/temp/helloworld.wsgi'.
> > [Tue Jan 19 00:09:25 2010] [info] mod_wsgi (pid=13103): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:37 2010] [info] mod_wsgi (pid=13075): Create
> > interpreter 'localhost|/djvocab'.
> > [Tue Jan 19 00:09:37 2010] [info] [client ::1] mod_wsgi (pid=13075,
> > process='', application='localhost|/djvocab'): Loading WSGI script '/
> > Users/fhuddles/work/djvocab/apache/django.wsgi'.
> > Fatal Python error: Interpreter not initialized (version mismatch?)
> > [Tue Jan 19 00:09:37 2010] [notice] child pid 13075 exit signal Abort
> > trap (6)
> > [Tue Jan 19 00:09:37 2010] [info] mod_wsgi (pid=13124): Initializing
> > Python.
> > [Tue Jan 19 00:09:37 2010] [info] mod_wsgi (pid=13074): Create
> > interpreter 'localhost|/djvocab'.
> > [Tue Jan 19 00:09:37 2010] [info] [client ::1] mod_wsgi (pid=13074,
> > process='', application='localhost|/djvocab'): Loading WSGI script '/
> > Users/fhuddles/work/djvocab/apache/django.wsgi'.
> > Fatal Python error: Interpreter not initialized (version mismatch?)
> > [Tue Jan 19 00:09:37 2010] [info] mod_wsgi (pid=13124): Attach
> > interpreter ''.
> > [Tue Jan 19 00:09:38 2010] [notice] child pid 13074 exit signal Abort
> > trap (6)
>
> > I looked at the permissions in the Framework directories:
> > /Library/Frameworks/Python.framework: mostly rwxr-xr-x, not less
> > restrictive
> > Versions: same
> > 2.6: same
> > bin: same
> > lib: some rw-rw-r--, for example.
> > ls -l Resources
> > total 8
> > drwxrwxr-x 3 root admin 102 Nov 26 19:56 English.lproj
> > -rw-rw-r-- 1 root admin 916 Oct 27 13:50 Info.plist
> > drwxrwxr-x 3 root admin 102 Nov 26 19:57 Python.app
> > any others I should look at: there are a lot, but I figure that gets
> > the main ones.
> > Besides, since the helloworld app ran, I figure it's not in the
> > permissions there.
> > My app directory (/Users/fhuddles/work/djvocab) has mostly rw-r--r--.
>
> > --
> > 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.