Using mod_python apache module

From: Jim Hurlburt <jlh(at)yvn(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Using mod_python apache module
Date: 2001-08-03 02:30:27
Message-ID: 01080219302702.32757@hex.diskworld
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-novice

Sirs:

I have a linux system, a fairly heavly modified version of mandrake 7.1
(upgraded a piece at a time instead of re-installing)
2.4.5 kernel
python 2.1.1
postgresql 7.1.2
apache 1.3.20
mod_python apache module
(requires a copy of python compiled without threads)
kde 2.1.1
gcc 2.95.3 (came with mandrake)

Libraries etc such that all of the above except gcc were compiled on this
system.

I fetched the tarball of postgresql 7.1.2, mxDateTime and built
them. mxDateTime appears to have installed correctly -- at least I can
import mx.DateTime without an error.
Postgresql appears to have built and installed ok -- initdb worked, I started
the server and was able to connect to the command line interface, create and
manipulate tables and users. Imported data to several tables from
mysql.

I am in the process of building a web application (database driven mud server
with attendant world editing capabilities) with a browser interface into the
dataserver.

I am currently using python, with mod_python on apache, and mysql (MySQLdb)
as the data engine.

For several reasons, not the least of which is subselects, I wish to move to
postgresql. I was able to compile and run the server with only normal hassle
as I learned how to do it. However, so far I am unable to use Pygresql, and
my attempt to use PoPy failed with thread issues vs mod_python.

I sent an e-mail requesting enlightenment to the maintainer of pygresql
(darcy(at)druid(dot)net) and have recieved no reply. I hesitate to bug him -- don't
know what the customs are.

The results of attempting to use pygresql are --

this test script.
********************************
#!/usr/local/python

import sys, os, re, pg

print "Hello There"

*************************************************************
I got the following set of error messages.

******************************************************************
Traceback (most recent call last):
File "./testpg.py", line 3, in ?
import sys, os, re, pg
File "/usr/local/lib/python2.1/pg.py", line 7, in ?
from _pg import *
ImportError: /usr/local/lib/python2.1/site-packages/_pgmodule.so: undefined
symbol: PQoidValue
*******************************************************************

I got essentially the same error message when trying to run one of the test
scripts in the postgresql source tree.

It would appear to me that either a header file was not found when
_pgmodule.so was built, or my version of python is not viable for this module.

Any clues? I would be happy to RTFM if I had any clue as to which manual,
and what I might be looking for.
I have dug thru the faq and other on line resources -- attempted to search
the mailing list archive without success. One thread that hinted that an
install script for pygresql might need updating, but if a resolution, or even
a clear description of the problem it was to solve, was there I didn't find
it.

Bottom line is that I would like to use postgresql with python and apache. I
would much prefer to use the mod_python apache module, but would consider
different ideas if necessary.

thanks in advance
Jim Hurlburt
Yakima, WA
jlh(at)yvn(dot)com

A chair by fire -- A cat on the lap -- A drink at hand --A good book
-- Paradise

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Horst Herb 2001-08-03 03:59:26 Re: [INTERFACES] Using mod_python apache module
Previous Message Dave Page 2001-08-02 21:45:03 RE: ODBC driver installation error

Browse pgsql-novice by date

  From Date Subject
Next Message Horst Herb 2001-08-03 03:59:26 Re: [INTERFACES] Using mod_python apache module
Previous Message Phillip J. Allen 2001-08-02 14:01:03 Managing a pgsql backend on both a Linux & WinNT workstation with a MSAccess Frontend?