Re: DBI Errors When Using Maypole
[prev]
[thread]
[next]
[Date index for 2004/07/27]
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;
};
 |
 |
Re: DBI Errors When Using Maypole
a.campbell 09:13 on 27 Jul 2004
|