Philip Mak wrote:
>
> I recently noticed some strange error messages in my error_log. This is
> from animelyrics.com, which uses Apache::ASP and MySQL.
>
> Issuing rollback() for database handle being DESTROY'd without explicit
> disconnect() at (eval 9) line 22.
>
This implies that you have a database handle that is destroyed
in the scope of running your program. Then it would seem that you
are not using Apache::DBI? I don't think I get this error when
I start using Apache::DBI. Remember to load Apache::DBI before DBI.
]# perl -MDBI -e 'DBI->connect(qw(dbi:mysql:host=...), qw(root))';
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
Apache::DBI keeps a connection cached so that it won't close until
your apache child exits. It probably then issues a disconnect itself.
>
> (1) I never use rollback() anywhere in my code... so I'm wondering if
> something else could cause a rollback.
>
Note with above, its probably just DBI that does it.
> (2) The "(eval 9) line 22" message doesn't tell me what file the error is
> in. The modperl guide suggested adding the following lines to my perl
> startup file so that the messages would show the correct file:
>
> use Carp ();
> local $SIG{__WARN__} = \&Carp::cluck;
>
> ...but they don't seem to have any effect after I added them and did an
> "apachectl restart".
>
Does:
use Carp ();
$SIG{__WARN__} = \&Carp::cluck;
that work better after a stop/start?
-- Josh