Installing mod_python on mac os 10.4.7

Graham Dumpleton Graham.Dumpleton at gmail.com
Mon Jul 30 01:28:45 CEST 2007


On Jul 30, 2:37 am, 7stud <bbxx789_0... at yahoo.com> wrote:
> On Jul 29, 4:07 am, Graham Dumpleton <Graham.Dumple... at gmail.com>
> wrote:
>
> > Have you got an appropriate LoadModule directive in Apache
> > configuration to load the mod_python module? That you get this error
> > is indicative of mod_python module not being loaded. You can check the
> > Apache error logs to see if mod_python got loaded.
>
> > See:
>
> >  http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking
>
> > for more help on debugging.
>
> That article says the LoadModule directive should be:
>
> >LoadModule python_module libexec/mod_python.so
>
> I saw this note in /Library/Apache2/conf/http.conf
>
> # Configuration and logfile names: If the filenames you specify for
> many
> # of the server's control files begin with "/" (or "drive:/" for
> Win32), the
> # server will use that explicit path.  If the filenames do *not* begin
> # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
> # with ServerRoot set to "/Library/Apache2" will be interpreted by the
> # server as "/Library/Apache2/logs/foo.log".
>
> I have this server root in /Library/Apache2/conf/httpd.conf:
>
> ServerRoot "/Library/Apache2"
>
> So in the Load Module directive, the actual path to the mod_python.so
> file is:
>
> /Library/Apache2/libexec/mod_python.so
>
> But I checked and I don't have a /Library/Apache2/libexec directory.

Run 'apxs' for the version of Apache you are using to work out what
the actual modules directory should be:

$ /usr/local/apache-2.2.4/bin/apxs -q LIBEXECDIR
/usr/local/apache-2.2.4/modules

If there is no mod_python.so in there then you can't have done the
mod_python install properly. Go back to the mod_python source code and
rerun:

  sudo make install_dso

When you do that it will even tell you exactly what the LoadModule
line you should use is.

Also ensure you actually installed the Python module components of
mod_python. You can redo that by running:

  sudo make install_py_lib

Graham




More information about the Python-list mailing list