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

Graham Dumpleton graham.dumpleton at gmail.com
Mon Jun 18 18:20:28 EDT 2007


Lets try something else then. Run 'file' on your mod_python.so and
httpd executable.

kundalini:~ grahamd$ file /usr/local/apache-2.0/modules/mod_python.so
/usr/local/apache-2.0/modules/mod_python.so: Mach-O bundle ppc
kundalini:~ grahamd$ file /usr/local/apache-2.0/bin/httpd
/usr/local/apache-2.0/bin/httpd: Mach-O executable ppc

Being on an Intel Mac, want to make sure that both are actually Intel
binaries and you aren't somehow using an PPC Apache in emulation with
a Intel mod_python.so or something similar.

Also run 'otool' on each:

kundalini:~ grahamd$ otool -L /usr/local/apache-2.0/modules/mod_python.so
/usr/local/apache-2.0/modules/mod_python.so:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.1.6)
        /System/Library/Frameworks/Python.framework/Versions/2.3/Python
(compatibility version 2.3.0, current version 2.3.5)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 18.0.0)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version 300.0.0, current version 567.27.0)
kundalini:~ grahamd$ otool -L /usr/local/apache-2.0/bin/httpd
/usr/local/apache-2.0/bin/httpd:
        /usr/local/apache-2.0/lib/libaprutil-0.0.dylib (compatibility
version 10.0.0, current version 10.12.0)
        /usr/local/apache-2.0/lib/libexpat.0.dylib (compatibility
version 2.0.0, current version 2.0.0)
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0,
current version 5.0.0)
        /usr/local/apache-2.0/lib/libapr-0.0.dylib (compatibility
version 10.0.0, current version 10.12.0)
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0,
current version 369.5.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.1.6)

Even doing a 'ls -las' with each may help.

kundalini:~ grahamd$ ls -las /usr/local/apache-2.0/modules/mod_python.so
808 -rwxr-xr-x   1 grahamd  grahamd  410220 Nov 10  2006
/usr/local/apache-2.0/modules/mod_python.so
kundalini:~ grahamd$ ls -las /usr/local/apache-2.0/bin/httpd
3200 -rwxr-xr-x   1 grahamd  grahamd  1636540 Jul 31  2006
/usr/local/apache-2.0/bin/httpd

Post the results you get.

Graham

On 19/06/07, mario curiel <mario at avepublishing.com> wrote:
> Hello,
>
> thanks, I run the strings line  but there is no AP22, or AP2 line,
> does it mean something?
> > 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
>
> thanks a lot
>
> Alberto
>
>
> On 18/06/2007, at 12:34 AM, Graham Dumpleton wrote:
>
> > 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