[mod_python] Problems using Postgres 7.1 from mod_python

Bo Lorentsen bl at netgroup.dk
Tue Aug 21 10:40:50 EST 2001


Jørgen Frøjk Kjærsgaard wrote:

> I'm having problems using a Postgres 7.1 database under FreeBSD 4.3 from
> Python 2.1.1/mod_python. I have tried using PyGreSQL. In the lastest port
> version, PyGreSQL simply crashes Python when I import it. Then I tried
> downgrading to Python 2.1. PyGreSQL now works from Python without mod_python,
> but in mod_python, it crashes when it is imported! Any ideas?

Are your sure you dont mix two differant postgres libs, so that you load an old
one when using apache modules an the right one when starting up normally ? I
have tried this, and I took me long time to find it, and I only got myself to
blame :-)

> PyGreSQL seems to be unstable. It may be better to use another interface but
> it seems like the alternatives require threading, which doesn't wotk with
> mod_python.

I have been using "psycopg" with good results, but not on a BSD but on Linux.
The is the latest Python/postgresql bridge project and it work greate for me.

Hope this help

/BL




More information about the Mod_python mailing list