CDS-Invenio: [notice] mod_python: (Re)importing module ‘mod_python.publisher’

Yesterday I looked at /var/log/httpd/error_log and observed a [notice] mod_python: (Re)importing module ‘mod_python.publisher’ was filling apache error_log file.

Tibor (from CDS Support Team) told me this was a harmless notice I could safely ignore. I wanted to get rid of it because it fills logs, so I decided to upgrade my mod_python to last version available (3.3.1).

My system is Red Hat 5 x64. The details of the installation are described below:

First install some packages:

yum install httpd-devel
yum install python
yum install db4
yum install flex

*Note: httpd-devel package installation includes apr and apr-devel packages.

Then, locate your apxs (usually in /usr/sbin/apxs):

updatedb
locate apxs

Now you are ready to proceed with the installation of mod_python 3.3.1. You can download a compressed tar from HERE. Make a new directory in your /home directory and uncompress the contents to it. Make sure the new directory does not contain white spaces or weird characters:

mkdir /home/cdsadmin/mod_python
cd /home/cdsadmin/mod_python
mv mod_python-3.3.1.tgz ./mod_python
tar -xzvf mod_python-3.3.1.tgz

This will create a new directory called mod_python-3.3.1. Now move into it and just compile and make mod_python with the following commands:

cd mod_python-3.3.1
./configure --with-apxs=/usr/sbin/apxs --with-flex=/usr/bin/flex

*Note the /usr/sbin/apxs is the path which was returned with locate apxs. Same with flex.

Let’s continue:

make

And now make yourself root and then:

make install

Last step, restart apache!

/etc/init.d/httpd restart

Now your error_log should not have those annoying [notice]‘s.

;)

Related posts:

  1. Know mod_python running version [SOLVED]
  2. Updating invenio v0.99 to v1.0 – cheatsheet
  3. CDS-Invenio: compress CSS to speed up page load
  4. [Errno 13] Permission denied: ‘/root/.python-eggs’ [SOLVED]
  5. CDS Invenio: bibrank exceptions [SOLVED]

2 Responses to “CDS-Invenio: [notice] mod_python: (Re)importing module ‘mod_python.publisher’”

  • Actually, in the context of pre 3.3 versions of mod_python, continual generation of that line in the error logs can signify that your application could have problems. This is because you are triggering a deficiency in older versions of mod_python that can cause constant reloading and potentially cross pollution of load modules. For details on this and lots of other problems in older mod_python versions read:

    http://www.dscpl.com.au/wiki/ModPython/Articles/ModuleImportingIsBroken

  • admin says:

    Graham, I really appreciate your tip. I’ll take a look at the link you provide.

    Thanks again ;)

Leave a Reply

Paypal donate

Please help me keep this blog up by donating.

Por favor, ayúdame a continuar con el blog donando.