views:

1252

answers:

1

After upgarding my MBP to 10.6, I get the following in my apache's error.log:

[error] [client ::1] Premature end of script headers: django.wsgi

WSGI FAQ suggests:

If using daemon mode, this is a symptom of the mod_wsgi daemon process crashing when handling a request. You would probably also see the message 'segmentation fault'. See answer for question about 'segmentation fault' above.

The referred section above says:

This is nearly always caused due to mod_python also being loaded by Apache at the same time as mod_wsgi and the Python installation not providing a shared library, or mod_python having originally being built against a static Python library. This is especially a problem with older Linux distributions before they started shipping with Python as a shared library.

Apache seems to be configured correctly (hasn't changed since before install), and mod_python isn't being loaded.

I tried rebuilding mod_wsgi using the same instructions I did last time, but I get an error when I make spanning 9k lines, the short version being:

[...]

lipo: can't figure out the architecture type of: <some temp file>.out

I did a bunch of other poking around - making sure I'm running the installation of Apache I think I'm running, the config files loaded are the ones I'm looking at, etc, but I'm running out of troubleshooting steps. Solutions and advice for next step both welcome :)

+2  A: 

Please use discussion on mod_wsgi list on Google Groups. I don't want to be answering Snow Leopard issues in two places.

http://groups.google.com/group/modwsgi/browse_frm/thread/c0ca8e6dd5f80417


UPDATE 1

You must install XCode from the optional installs directory of the MacOS X installation CD. If you do not do this, then none of the system, Apache or Python header files will be installed.

Looks like you still have MacPorts gcc installed and so that was found to do compilation, but lack of all the header files caused it to fail.

FWIW, mod_wsgi works fine under Snow Leopard using standard Apple supplied Apache, Python and GNU compiler.

Graham Dumpleton