Matt Carothers wrote:
>
> On Mon, 12 Jun 2000, Rob Tanner wrote:
>
> > Believe it or not, it's the simplest task in the world. In startup.pl add
> > the line "PerlModule Apache::DBI"
>
> You can either stick "PerlModule Apache::DBI" in your httpd.conf or add
> 'use Apache::DBI ();' to your startup.pl. Also, for mysql, you'll need
> to add a keepalive routine to your startup.pl:
>
> sub Apache::DBI::db::ping {
> my $dbh = shift;
> return $dbh->do('select 1');
> }
>
> - Matt
this is safer:
sub Apache::DBI::db::ping {
my $dbh = shift;
my $ret = 0;
eval {
local $SIG{__DIE__} = sub { return (0); };
local $SIG{__WARN__} = sub { return (0); };
$ret = $dbh->do('select 1');
};
return ($@) ? 0 : $ret;
}
Edmund
--
Edmund Mergl
mailto:[EMAIL PROTECTED]
http://www.edmund-mergl.de
fon: +49 700 EDEMERGL