After some debugging inside Apache I have figured out half the problem, I was using dbd instead of dbd->handle. It sucks being a newbie:( The CentOS problem remains though and is unrelated. I will try and put the latest on and see if that fixes the issue. Thanks for the help. -Matt
--- On Thu, 1/1/09, Ruediger Pluem <[email protected]> wrote: > From: Ruediger Pluem <[email protected]> > Subject: Re: mod_dbd issues > To: [email protected] > Date: Thursday, January 1, 2009, 4:13 PM > On 01/01/2009 05:50 PM, Matthew Rushton wrote: > > Hi, > > I'm trying to use mod_dbd for a Linux module > with a Postgres backend and am running into a bunch of > issues. It seems easy enough but all my queries are failing > becasue I'm not getting back a valid db handle either. > Here's my httpd.conf: > > > > LoadModule dbd_module modules/mod_dbd.so > > DBDriver pgsql > > DBDParams "hostaddr=192.168.1.2 dbname=******* > user=******* connect_timeout=2" > > DBDMin 5 > > DBDKeep 20 > > DBDMax 50 > > DBDExptime 120 > > > > and in my module code: > > > > //connect to database > > dbd = ap_dbd_acquire(r); > > //I get back a non-null dbd value > > PGconn *conn = > apr_dbd_native_handle(dbd->driver,dbd); > > ...do stuff... > > > > When I connect with the native Postgres function > things work just fine. I've tried this on CentOS 5 and > FC9 with the same behavior. On CentOS 5 I'm getting > these errors as well when trying to restart (this is not > with my module even loaded, simply just by loading mod_dbd): > > > > *** glibc detected *** /usr/sbin/httpd: corrupted > double-linked list: 0x08ecb7a8 *** > > [Thu Jan 01 11:11:41 2009] [warn] child process 25480 > still did not exit, sending a SIGTERM > > > > At a bit of a loss, with the exception of recompining > apache with debug I'm not really sure how to tackle the > issue, perhaps it's a simple issue someone may know > right away. Thanks. > > -Matt > > I assume that you use the CentOS provided httpd version. > This is fairly old. Please retry > with the latest one and let us know if you still have > problems. > > Regards > > RĂ¼diger
