[mod_python] mod_python.so: undefined symbol: ap_loaded_modules

Mark Dokter dokter at icg.tu-graz.ac.at
Mon Nov 28 11:30:13 EST 2005


After a week off (had to study for two exams) I got back to work and to my 
problem loading mod_python. Thank you for all your suggestions, but I still 
have no clue what's wrong.


On Wednesday 16 November 2005 18:46, Jim Gallacher wrote:

>
> Wrong. /etc/apache2/mods-enabled contains symbolic links to
> /etc/apache2/mods-available which in turn contains Apache configuration
> files. These files hold directives for loading *Apache* modules. This
> has nothing to do with the python modules in site-packages/mod_python.
> /usr/lib/apache2/modules does *NOT* belong on your PythonPath.
>
> On Debian:
>
> /etc/apache2/mods-enabled/mod_python.conf should be a symbolic link to
> /etc/apache2/mods-available/mod_python.conf.
>

It is a symbolic link.

> /etc/apache2/mods-available/mod_python.conf should contain:
>
> LoadModule python_module /usr/lib/apache2/modules/mod_python.so
>

On my machine this LoadModule statement is 
in /etc/apache2/mods-available/mod_python.load

>
> What do the first 2 lines of /var/log/apache2/error.log show after an
> Apache restart? They should look something like this:
>
> [Wed Nov 16 12:24:07 2005] [notice] mod_python: Creating 8 session
> mutexes based on 50 max processes and 0 max threads.
> [Wed Nov 16 12:24:07 2005] [notice] Apache/2.0.54 (Debian GNU/Linux)
> DAV/2 SVN/1.2.0 mod_python/3.2.5-dev-20051112 Python/2.3.5 PHP/4.4.0-1
> configured -- resuming normal operations

This is what my log says:

[Sun Nov 27 06:26:46 2005] [notice] mod_python: Creating 20 session mutexes 
based on 20 max processes and 0 max threads.
[Sun Nov 27 06:26:47 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) DAV/2 
SVN/1.2.3 mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-16 mod_ssl/2.0.54 
OpenSSL/0.9.
7g mod_perl/2.0.1 Perl/v5.8.7 configured -- resuming normal operations



>
> Also check the output of the following command:
>    ldd /usr/lib/apache2/modules/mod_python.so |grep python
>
> Which on my system yields:
>    libpython2.3.so.1.0 => /usr/lib/libpython2.3.so.1.0 (0xb7e61000)

Same thing here:

# ldd /usr/lib/apache2/modules/mod_python.so |grep python

libpython2.3.so.1.0 => /usr/lib/libpython2.3.so.1.0 (0xb7e27000)

>
> Jim


Mark


More information about the Mod_python mailing list