Re: DBI Errors When Using Maypole

[prev] [thread] [next] [Date index for 2004/07/27]

From: a.campbell
Subject: Re: DBI Errors When Using Maypole
Date: 09:13 on 27 Jul 2004
I had a similar problem. My guess as to whats happening is that Ima::DBI connect_cach method, does not function as you'd imagine under mod_perl. So when you make a call, it actual pulls out an active statement handler. The failure is in Ima::DBI if I remember correctly something along the lines of $sth->active() .

My solution was within Ima::DBI, altering the function _mk_db_closure 
and using Apache::DBI to cache my handles. Not very elegant, but well it got it working.

 return sub {
                if ( $ENV{'MOD_PERL'} ){
                        $dbh = DBI->connect(@connection);
                }
                else {
                        unless ($dbh && $dbh->FETCH('Active') && $dbh->ping) {
                                $dbh = DBI->connect_cached(@connection);
                        }
                }
                return $dbh;
        };

DBI Errors When Using Maypole
Robert James Kaes 17:44 on 26 Jul 2004

Re: DBI Errors When Using Maypole
a.campbell 09:13 on 27 Jul 2004

Re: DBI Errors When Using Maypole
Tim Bunce 18:05 on 27 Jul 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52