[mod_python] Installation Problems on Macbook Pro x86_64

Joe Moore moore.joseph at gmail.com
Tue Apr 15 13:11:53 EDT 2008


Hello,
I'm attempting to install mod_python on my Macbook pro running 10.5.2 and I
am so far unsuccessful. I have read the various posts dating from October
and have compiled mod_python for x86_64. This allowed compilation but Apache
would die with the with the following error:

4/15/08 12:55:18 PM org.apache.httpd[26291] httpd: Syntax error on line 116
of /private/etc/apache2/httpd.conf: Cannot load
/usr/libexec/apache2/mod_python.so into server:
dlopen(/usr/libexec/apache2/mod_python.so, 10): Symbol not found:
_PyObject_GenericGetAttr\n  Referenced from:
/usr/libexec/apache2/mod_python.so\n  Expected in: dynamic lookup\n

I then read a post regarding the two pythons problem
(/System/Library/Frameworks + /Library/Frameworks) I don't believe I
installed the second but somehow it's there.

I removed the python at /Library/Frameworks and recompiled. This seems to
have worked in the sense that Apache no longer dies but I also can't seem to
get mod_python working. All python files are served as plaintext.

The added line to my httpd.conf looks like this:

LoadModule python_module libexec/apache2/mod_python.so

and I stuck a .htaccess in a directory in the sites folder under my user
account that contains:

AddHandler mod_python .py
PythonHandler mptest
PythonDebug On

and a test file in that same directory:

from mod_python import apache
def handler(req):
        req.content_type = 'text/plain'
        req.write("hello world!")
        return apache.OK

...Still plaintext

I appreciate any help. I have spent waaay to many hours trying to get this
up and running. My disclaimer here is that I'm a bit of an idiot about
Apache and have just started picking up Python.

Thanks!
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080415/310db153/attachment.html


More information about the Mod_python mailing list