Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Jeremy Nixon
Perrin Harkins <[EMAIL PROTECTED]> wrote: > If you have some code that is caching $dbh in a global or closure, and > not calling Apache::DBI->connect() on every request, it can't replace > that, and neither can DBI->connect_cached(). That defeats the auto- > reconnect features of both. I recom

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Perrin Harkins
On Sun, 2006-01-15 at 23:35 +, Jeremy Nixon wrote: > Perrin Harkins <[EMAIL PROTECTED]> wrote: > > > my $cache = $dbh->FETCH('CachedKids'); > > > > That should return cached handles from the current $dbh, not an old one > > that has been replaced. The statement handles are attached to the >

Re: how to configure the mod_perl to show a jpeg file.

2006-01-15 Thread 黄叶
but, if i had a project, i want put the all thing a directory. Can i do like that? if I don't use the ModPerl::Registry or edit the ModPerl::Registry, that is correct? or there are the other way? thanks.

Re: how to configure the mod_perl to show a jpeg file.

2006-01-15 Thread Frank Wiles
On Mon, 16 Jan 2006 10:37:24 +0800 黄叶 <[EMAIL PROTECTED]> wrote: > HI, All. > I had configure the mod_perl environment, it is here: > > Alias /perl/ /home/ghw/myperl/webproject/ > PerlSwitches -T > >AddHandler perl-script .pl >SetHandler perl-script >PerlResponseHandler

how to configure the mod_perl to show a jpeg file.

2006-01-15 Thread 黄叶
HI, All. I had configure the mod_perl environment, it is here: Alias /perl/ /home/ghw/myperl/webproject/  PerlSwitches -T      AddHandler perl-script .pl    SetHandler perl-script    PerlResponseHandler ModPerl::Registry    PerlOptions +ParseHeaders    Options +ExecCGI    O

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Jeremy Nixon
Perrin Harkins <[EMAIL PROTECTED]> wrote: > my $cache = $dbh->FETCH('CachedKids'); > > That should return cached handles from the current $dbh, not an old one > that has been replaced. The statement handles are attached to the > database handle, so if it gets replaced, all the old ones go away.

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Perrin Harkins
On Sun, 2006-01-15 at 23:11 +, Jeremy Nixon wrote: > Perrin Harkins <[EMAIL PROTECTED]> wrote: > > > The prepare_cached() method he's using will check the statement handle > > and prepare it again on the new connection if necessary. > > Not with Apache::DBI, though. The reconnect happens u

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Jeremy Nixon
Perrin Harkins <[EMAIL PROTECTED]> wrote: > The prepare_cached() method he's using will check the statement handle > and prepare it again on the new connection if necessary. Not with Apache::DBI, though. The reconnect happens underneath DBI, and you end up with the same $dbh, which thinks the

Apache::DBI

2006-01-15 Thread Paul Harrison
  I installed Apache::DBI - 0.98 on FreeBSD 5.4 with mod_perl 1.   Apache::DBI logs an entry in apache error log file every time it create(s) a new connection or using an existing connection to the database server. Is this normal with this version?  And how do I turn that feature off?

Apache DBI

2006-01-15 Thread Paul Harrison
I installed Apache::DBI - 0.98 on FreeBSD 5.4 with mod_perl 1.   Apache::DBI logs an entry in apache error log file every time it create(s) a new connection or using an existing connection to the database server. Is this normal with this version?  And how do I turn that feature off?  

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Perrin Harkins
Jeremy Nixon wrote: Here's the thing: if your database connection goes away, and Apache::DBI opens a new one, any prepared statement handles you might have become invalid, because prepared statements are per-connection. The prepare_cached() method he's using will check the statement handle and

Re: Apache::DBI and DBD::Pg

2006-01-15 Thread Tim Bunce
On Sun, Jan 15, 2006 at 02:00:15AM +, Jeremy Nixon wrote: > Tyler MacDonald <[EMAIL PROTECTED]> wrote: > > > [Fri Jan 13 23:46:28 2006] [error] [client 192.168.99.112] DBD::Pg::db > > prepare_cached failed: FATAL: terminating connection due to administrator > > Here's the thing: if your data