I have $sth->finish in there right before the disconnect and it sill
gives me the message.  If it is just a warning message then there must
be something else wrong.  Is there something else that would cause it
not to work.  I gave mod_perl the "PERL_SECTIONS=1" option when I
compiled it. 

Here is a small snippit of how my script works to set up the virtuals:

############################

use DBI;

my $db = xxxx;
my $user = xxxx;
my $password = xxxx;
my $baseDir = xxxx;

my $dbh = DBI->connect($db, $user, $password) || die $DBI::errstr;

my $sth = $dbh->prepare("SELECT domain FROM domain") || die
$dbh->errstr;
$sth->execute() || die $sth->errstr;

my($domain);
while($domain = $sth->fetchrow_array)
  {
    $PerlConfig .= <<"CONFIG";
<VirtualHost $ipAddr>
    ServerName www.$domain
    ServerAdmin webmaster@$domain
    ServerAlias $domain
    DocumentRoot $baseDir/www.$domain/htdocs/
</VirtualHost>

CONFIG
  }
$sth->finish;
$dbh->disconnect;

############################

Again, it works fine on another machine with the apache rpm.

Thanks,
Bryan Opfer


Geoffrey Young wrote:
> 
> > -----Original Message-----
> > From: Bryan J. Opfer [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 19, 2000 3:27 PM
> > To: Modperl List
> > Subject: Perl Section...
> >
> >
> > Anyone know what this error would mean:
> >
> > DBI handle cleared whilst still active at
> > /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 195.
> >     dbih_clearcom (h 0x83b1900, com 0x81b6d50):
> >        FLAGS 0x211: COMSET Warn AutoCommit
> >        TYPE 1
> >        PARENT undef
> >        KIDS 0 (0 active)
> >        IMP_DATA undef in 'DBD::mysql::dr'
> 
> this is a problem with your DBI script - it basically means that you still
> have a cursor open when you disconnected...
> 
> try calling $sth->finish before $dbh->disconnect - it should go away.
> 
> at any rate, it's just a warning...
> 
> --Geoff
> 
> >
> >
> > This error comes up in my apache error log.  I have a Perl
> > section in my
> > httpd.conf that sets up all my virtual hosts.
> >
> > Apache starts up fine, but the virtual hosts are not set up and I get
> > that error in the error log.  I am using Apache 1.3.12 compiled from
> > source.
> >
> > I have the same setup on another machine with Apache 1.3.9
> > (RPM) and it
> > works fine.
> >
> > DBI is version 1.13.
> >
> > Thanks,
> > Bryan Opfer
> >

Reply via email to