[mod_python] Apache 2.1?

Jorey Bump list at joreybump.com
Wed Sep 14 19:44:50 EDT 2005


Conrad Steenberg wrote:

> Has anybody had any luck compiling and running mod_python inside Apache
> 2.1?

Why, yes, indeed. I have. :)

Slackware Linux 10.1
Python 2.4.1
Apache 2.1.6 Alpha

You must patch the mod_python source before running ./config.

Remove this from src/filterobject.c:

if (!APR_STATUS_IS_EAGAIN(self->rc) && !APR_STATUS_IS_SUCCESS(self->rc)) {
   PyErr_SetObject(PyExc_IOError,
   PyString_FromString("Input filter read error"));
   return NULL;
}

And remove this from src/connobject.c:

if (! APR_STATUS_IS_SUCCESS(rc)) {
   PyErr_SetObject(PyExc_IOError,
   PyString_FromString("Connection read error"));
   return NULL;
}

Then the usual (modify to point to your version of apxs):

  ./configure --with-apxs=/usr/local/apache2/bin/apxs
  make
  su -
  make install

I haven't tried out the latest Apache 2.1.7, but hopefully this will 
work the same.



More information about the Mod_python mailing list