[mod_python] Installation Problems on Macbook Pro x86_64

Joe Moore moore.joseph at gmail.com
Wed Apr 16 00:33:51 EDT 2008


Thanks so much Graham!
Great docs! I wish I had found them earlier. I just changed the Apache
directive for the directory to AllowOverride All and everything now seems to
be working. On to adding MySQL to the party.
-Joe

On Tue, Apr 15, 2008 at 6:16 PM, Graham Dumpleton <
graham.dumpleton at gmail.com> wrote:

> 2008/4/16 Joe Moore <moore.joseph at gmail.com>:
> > 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.
>
> Did you find:
>
>  http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking
>
> Take particular note of whether you have FileInfo override enabled for
> the directory you have the .htaccess file in.
>
> Introduce a syntax error into that .htaccess file, ie., add some crap
> like 'XXX' and see if Apache gives back a 500 error. If it doesn't the
> file isn't even being consulted and FileInfo probably needs to be
> enabled.
>
> Graham
>



-- 
Whatever is credible has authority; whatever is imposed has power. --de
certeau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080416/f74eb4a2/attachment.html


More information about the Mod_python mailing list