On Thu, 5 Apr 2001, Alec Smith wrote:

> In my module I've got:
> 
> use DBI;
> use Apache::DBI;
> $db = DBI->connect('DBI:mysql:dbname', 'username', 'password', {RaiseError 
> => 1, AutoCommit => 1});

Have a read of the Apache::DBI man page and it will explain what is wrong
here.

You don't need to add Apache::DBI in your module.

> and in startup.pl:
> 
> use DBI;
> use Apache::DBI;
> Apache::DBI->connect_on_init('DBI:mysql:dbname', 'username', 
> 'password',{RaiseError => 1, AutoCommit => 1});

The use Apache::DBI should come bofore the use DBI call.  In fact, the use
Apache::DBI should come before you load any DBI enabled modules in you
config files.

Cees Hek

> 
> yet I'm still seeing the  error
> 
> Issuing rollback() for database handle being DESTROY'd without explicit 
> disconnect() at /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 139.
> 
> in the logs.
> 
> Still lost,
> Alec
> 
> 
> At 09:24 AM 4/5/01 +0100, you wrote:
> >You would only get that message if AutoCommit was off.
> >It should not be off for DBD::mysql (since it doesn't yet support
> >the transaction features of newer versions).
> >
> >Plus, disconnect doesn't do anything when using Apache::DBI
> >(by design).
> >
> >Tim.
> >
> >On Wed, Apr 04, 2001 at 11:49:17PM -0400, Alec Smith wrote:
> > > Issuing rollback() for database handle being DESTROY'd without explicit
> > > disconnect() at /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 139.
> > >
> > > Using Apache::DBI 0.88+DBI 1.14+mod_perl 1.25+MySQL 3.23.36 I'm getting 
> > the
> > > above in my error_log and am not sure why. Any ideas? I do have a
> > > $db->disconnect; line in my modules.
> > >
> > > Just a tad lost,
> > > Alec
> 
> 
> 

-- 
Cees Hek
SiteSuite Corporation
[EMAIL PROTECTED]

Reply via email to