> -----Original Message-----
> From: Bryan J. Opfer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 19, 2000 5:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Perl Section...
>
>
> 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.
hmmm... the DBI code looks ok... my immediate suspicion is that something is
wrong with your here document (though it looks ok here) and your finish and
disconnect are getting slurped, so when $dbh goes out of scope and gets
cleaned up, you get the error... that would explain why your vhosts don't
show up as well. Of course, that's just a suspicion, and since it works on
another server, I'm probably wrong...
try adding
DBI->trace(6,"/path/to/trace_log");
before you connect and send me the trace file...
you also might want to echo $PerlConfig out and make sure it's being
populated properly (if you haven't already)
HTH
--Geoff
>
> 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
> > >
>