I'm having a minor DBI problem with Apache/mod_perl and my web server
startup script. I do a DBI call in my startup.pl. When I start the
server, I get this in the error log:
Database handle destroyed without explicit disconnect at
/usr/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line 165.
DBI handle cleared whilst still active at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 252.
dbih_clearcom (h 0x8282c84, com 0x8b5bea0):
FLAGS 0x211: COMSET Warn AutoCommit
TYPE 1
PARENT undef
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Pg::dr'
[Wed Aug 21 16:48:34 2002] [notice] Apache/1.3.24 (Unix) mod_perl/1.27
mod_ssl/2.8.8 OpenSSL/0.9.6b configured -- resuming normal operations
Even though I have called disconnect(). My startup.pl looks like....
my $dbh = DBI->connect($DBNAME, $DBUSER, $DBPASS, {AutoCommit=>1,
RaiseError=>0})
or die "\n** Could not connect to the database\n\n $DBI::errstr\n\n";
my $dbversion = $dbh->selectall_arrayref
("SELECT schema_version FROM schema_info ORDER BY schema_date DESC
LIMIT 1")->[0][0];
$dbh->disconnect();
I'm wondering if it's related to the forking of the parent apache into
the children, since startup.pl runs from the parent. Web searches turn
up only vague references to this. Has anyone seen this? The server
runs fine but the warnings on startup are ugly.
Thanks,
Fran