[mod_python] [SPAM] mod_python.so is so garbled

Graham Dumpleton graham.dumpleton at gmail.com
Mon Jun 18 01:34:09 EDT 2007


On 18/06/07, mario curiel <mario at avepublishing.com> wrote:
> sorry, it was my mistake when I was writing this mail,
> the line 54 in the httpd.conf file is:
>
> LoadModule python_module /System/Library/Apache2/Modules/mod_python.so
>
> and not
> >> LoadModule python-module /System/Library/Apache2/Modules/
> >> mod_python.so
>
>
> ok, thanks,  I removed the line: AddModule mod_python.c
>
> but the error continues, when I enter httpd, of apachectl

The other reason this error can occur is that the mod_python.so you
are using wasn't actually compiled for the version of Apache you are
trying to run it with. Check your compilation output to make sure the
-I flags are getting headers file from correct location for that
version of Apache and that the header files in that location are in
fact for that Apache binary version. Also check that where the
mod_python.so file gets installed is where you are picking it up from
with configuration you are using.

You can run:

 strings /usr/local/apache-2.2/modules/mod_python.so | grep AP

on the mod_python.so that Apache is loading and you should get something like:

AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE
APR_NOFILE
APR_REG
APR_DIR
APR_CHR
APR_BLK
APR_PIPE
APR_LNK
APR_SOCK
APR_UNKFILE
AP22

That last line says mine was compiled for Apache 2.2. If it said AP20
then would have been compiled for Apache 2.0 instead.

> >> Syntax error on line 54 of /Local/Library/Webserver/Configuration/
> >> httpd.conf: API module structure ´python_module´ in file /System/
> >> Library/Apache/Modules/mod_python.so is so garbled - perhaps this is
> >> not an Apache module DSO?
>
> any idea?
>
> thanks a lot
>
> Alberto
>
>
> On 18/06/2007, at 12:16 AM, Graham Dumpleton wrote:
>
> > See comments below.
> >
> > On 18/06/07, mario curiel <mario at avepublishing.com> wrote:
> >> I got the error in apachectl -k start:
> >>
> >> httpd: Syntax error on line 54 of /Local/Library/Webserver/
> >> Configuration/httpd.conf: API module structure ´python_module´ in
> >> file /System/Library/Apache/Modules/mod_python.so is so garbled -
> >> perhaps this is not an Apache module DSO?
> >>
> >> In the computer has Mac OSX 10.4.9,
> >> MAC Pro with intel processors,
> >> python 2.5.1
> >> apache sever 2.2.4 (unix)
> >>
> >> a)installation of mod_python-3.3.1:
> >>
> >> -configure --with-apxs=/Library/Apache2/bin/apxs --with-fex=/usr/bin/
> >> flex
> >> make
> >> make install
> >>
> >>
> >> also I tried with
> >>
> >> b)
> >> make install_dso
> >> make install_py_lib
> >>
> >> in both cases (a and b) the last line of the install is the
> >> installation of the mod_python-3-3.1/py2.5.egg-info:
> >> writing /Library/Frameworks/Python.framework/verons/2.5/lib/
> >> python2.5/
> >> site-packages/mod_python-3-3.1/py2.5.egg-info
> >>
> >>
> >> I added the lines to the httpd.conf:
> >> the lines 54-56 :
> >>
> >> LoadModule python-module /System/Library/Apache2/Modules/
> >> mod_python.so
> >
> > This line is wrong. Should be 'python_module' not 'python-module'.
> >
> >> AddModule mod_python.c
> >
> > This line is not needed with Apache 2.
> >
> >> then I run apachectl -k start and the error appears:
> >>
> >> Syntax error on line 54 of /Local/Library/Webserver/Configuration/
> >> httpd.conf: API module structure ´python_module´ in file /System/
> >> Library/Apache/Modules/mod_python.so is so garbled - perhaps this is
> >> not an Apache module DSO?
> >>
> >>
> >> how to correct it?
> >>
> >> thanks a lot
> >>
> >> Alberto
> >> _______________________________________________
> >> Mod_python mailing list
> >> Mod_python at modpython.org
> >> http://mailman.modpython.org/mailman/listinfo/mod_python
> >>
> >
>
>



More information about the Mod_python mailing list