On Wed, 2004-11-10 at 02:37, Batara Kesuma wrote:
> > Also, why do you want to avoid persistent connections?
>
> Because the DB is running out of memory just to keep the persistent
> connections, I just want to try it without persistent connections and
> see the result. If the overhead is not too
On Wed, 10 Nov 2004, Batara Kesuma wrote:
[...]
## httpd.conf
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlCleanupHandler MyApache::Cleanup
Options +ExecCGI
## MyApache::Cleanup.pm
package MyApache::Cleanup;
use strict;
sub handler {
my ($r) =
On Wed, Nov 10, 2004 at 12:51:56PM +0900, Batara Kesuma wrote:
> Hi Stas,
>
> > 1) use Apache::DBI
> >
> > 2) if not, refer to:
> > http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlCleanupHandler
> > http://perl.apache.org/docs/2.0/user/coding/coding.html#Getting_the_C__r__Object
>
>
Hi Perrin,
> It looks to me like you are creating this problem by using "our". Why
>
> not use "my" and pass the handle around, or put it somewhere like
> $r->pnotes() instead?
Yes I should have used 'my' and passed the handle around :(
> Also, why do you want to avoid persistent connections?
Batara Kesuma wrote:
But I have a problem here, because I
use 'our' on $dbh so other functions can use it. It looks like:
---
sub show_name {
our $dbh;
my $sth = $dbh->prepare("SELECT name FROM member WHERE id=?");
$sth->execute(1);
...
}
## MAIN
my $mn = MyPackage::Main::->new();
our $dbh
Batara Kesuma wrote:
Hi Stas,
1) use Apache::DBI
2) if not, refer to:
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlCleanupHandler
http://perl.apache.org/docs/2.0/user/coding/coding.html#Getting_the_C__r__Object
Thank you for the answer. I tried to use Apache::DBI with
dbi_connect_m
Hi Stas,
> 1) use Apache::DBI
>
> 2) if not, refer to:
> http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlCleanupHandler
> http://perl.apache.org/docs/2.0/user/coding/coding.html#Getting_the_C__r__Object
Thank you for the answer. I tried to use Apache::DBI with
dbi_connect_method =>
Batara Kesuma wrote:
Hi,
How can I pass $dbh value from PerlResponseHandler to PerlCleanupHandler
to be disconnected? My scripts are running in ModPerl::Registry, and I
don't want to do $dbh->disconnect() at the end of every scripts. So I
try to write a module in PerlCleanupHandler to clean up the
Hi,
How can I pass $dbh value from PerlResponseHandler to PerlCleanupHandler
to be disconnected? My scripts are running in ModPerl::Registry, and I
don't want to do $dbh->disconnect() at the end of every scripts. So I
try to write a module in PerlCleanupHandler to clean up the DB handler
at the en