On Yesterday at 10:01pm, BEC=>Beau E. Cox <[EMAIL PROTECTED]> wrote:
BEC> BEC> Should I use 'connect' in my startup.pl? BEC> BEC> Have any of you sucessfully installed and used ADBI under BEC> mod_perl 2? Any advice on what I'm missing? BEC> Hi Beau, I'm using apache 2.0.46, mod_perl 1.9909, perl v5.8.0, Apache::DBI 0.91 on a Gentoo kernel 2.4.20-ck6 without any problems in production. I have had no problems with using connect_on_init either. I have: use Apache::compat (); as my first use statement in my mod_perl startup.pl file. Further down the script, I have: use Apache::DBI; DBI->install_driver(mysql); Apache::DBI->connect_on_init(......fill in here......); If I set $Apache::DBI::DEBUG = 2 in my startup file I do see connects on init as the new apaches come up. Of course, I commented out that line when in production. Dunno about how to track your "make test" problems. Now that you know that someone has it working, you can retrace your steps and see if you missed something. I do however use this patch which is in cvs for Apache::DBI which skips use of uninitialized variable warnings upon server startup. --- DBI.pm 17 Feb 2003 13:04:19 -0000 1.6 +++ DBI.pm 4 Apr 2003 10:58:53 -0000 1.7 @@ -81,7 +81,7 @@ # won't be useful after ChildInit, since multiple processes trying to # work over the same database connection simultaneously will receive # unpredictable query results. - if ($Apache::ServerStarting == 1) { + if ($Apache::ServerStarting and $Apache::ServerStarting == 1) { print STDERR "$prefix skipping connection during server startup, read the docu !!\n" if $Apache::DBI::DEBUG > 1; return $drh->connect(@args); } Good luck, -- Haroon Rafique <[EMAIL PROTECTED]>