[mod_python] Problems using Postgres 7.1 from mod_python

Jørgen Frøjk Kjærsgaard jfk at informaticon.dk
Tue Aug 21 11:09:30 EST 2001


Tirsdag 21. August 2001 10:40 skrev du:
> 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 :-)

I don't think so, but I'll have to investigate it carefully...

> > 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.

Hmm.. If I understand things correctly (I'm new to mod_python) mod_python 
requires that Python is built without thread support, whereas psycopg 
requires a Python interpreter with threads. Is it possible for psycopg and 
mod_python to work together?

regards

Jørgen Frøjk Kjærsgaard, Systemkonsulent (Systems Consultant)
Informaticon ApS * Web: www.informaticon.dk * Tlf: +45 8672 0093
Internet programmering * Systemudvikling på Linux, FreeBSD og PalmOS



More information about the Mod_python mailing list