On Feb 6, 2011, at 8:20 AM, Perrin Harkins wrote:
Are you running the worker MPM? Apache::DBI will do the right thing
with prefork MPM, but I don't think it will work with threads.
Nope, prefork:
# apache2 -V
Server version: Apache/2.2.16 (Debian)
Server built: Nov 14 2010 18:14:55
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Thinking that the problem was that $dbh was having some weird scope
issue, I
moved all the connect calls into the subs that use them.
Yes, good call. The new() sub creates a closure with $dbh there.
Did earlier versions of Perl/mod_perl/DBI/Apache::DBI handle closures
differently? I'm just curious why it used to work. It seems like DBI
would reconnect a $dbh closure if it timed out.
Thanks, Perrin.
---
Max Pinton, m...@maxgraphic.com
Design your own card at http://www.designyourowncard.com/