Your script uses an END block to disconnect. If you use
Apache::Registry, that will not be run until the server is shut down.
With Apache::DBI, you should get one connection per Apache process, and
they'll stay open. If you are changing the login parameters (i.e.
different user each
Your script uses an END block to disconnect. If you use
Apache::Registry, that will not be run until the server is shut down.
With Apache::DBI, you should get one connection per Apache process, and
they'll stay open. If you are changing the login parameters (i.e.
different user each
On Thu, 13 Sep 2001, DJ (David J Radunz) wrote:
use strict;
use vars ($dbh);
You don't need this with Apache::DBI. Globals in general should be
avoided/used with extreme caution.
use mod_perl;
Don't need this either.
1;
END {
$dbh-disconnect;
}
Put this before the '1;' or just
Hi there,
On Thu, 13 Sep 2001, DJ (David J Radunz) wrote:
the database connections just keep building up.
Read the database section of the Guide:
http://perl.apache.org/guide
73,
Ged.
DJ (David J Radunz) wrote:
I am having a problem with a module im writing connecting to the
database everytime its run, and not cleaning up the database
connection when its finished.
Your script uses an END block to disconnect. If you use
Apache::Registry, that will not be run until the
Greetings,
I am having a problem with a
module im writing connecting to the database everytime its run, and not cleaning
up the database connection when its finished. I have tried the 2 scenarios below
and as yet i cannot work out how to stop the connections building up and
eventually