Re: DBI Errors When Using Maypole
[prev]
[thread]
[next]
[Date index for 2004/07/27]
On Tue, Jul 27, 2004 at 10:13:00AM +0100, a.campbell@xxxxxxxxxxx.xxx wrote:
> 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;
I've not followed this thread - but the above should not be required.
DBI 1.40 changes include:
Changed connect_cached() when running under Apache::DBI
to route calls to Apache::DBI::connect().
Tim.