Problem found. When I applied your setup, I was still getting the error originating from the OLD setup. Turns out the old setup was getting 'require'd in another file, so connect_on_init was being called when it wasn't supposed to. I removed the other reference, and everything now seems to be working as expected.
Thanks for your attention. - Aaron > -----Original Message----- > From: Philip M. Gollucci [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 07, 2005 3:27 PM > To: Aaron Scott > Cc: [email protected] > Subject: Re: Apache2::DBI > > Aaron Scott wrote: > > >--- httpd.conf > > > > PerlModule Apache2::DBI > > PerlRequire /var/www/bwc/cgi-bin/startup.pl > > PerlOptions -SetupEnv > > > >--- startup.pl > > > >use 0.96 Apache2::DBI; > > > >Apache2::DBI->connect_on_init(Shared::DB::DSN(), > > Shared::DB::DB_User(), > > Shared::DB::DB_Auth() > > ); > > > >--- > > > >Changing -SetupEnv to +SetupEnv had no effect. > > > >-Aaron > > > > > Try this setup: > > httpd.conf: > > LoadModule perl_module modules/mod_perl.so > Include conf/mod_perl.conf > > > conf/mod_perl.conf: > PerlSwitches -wT > PerlRequire conf/startup.pl > PerlModule Apache2::Status > PerlModule Apache::DBI > PerlModule DBI > > <Location /perl-status> > SetHandler perl-script > PerlResponseHandler Apache2::Status > PerlSetVar StatusOptionsAll On > PerlSetVar StatusDeparseOptions "-p -sC" > </Location> > > startup.pl: > use mod_perl2; > > use ModPerl::Util (); #for CORE::GLOBAL::exit > > use Apache2::RequestRec (); > use Apache2::RequestIO (); > use Apache2::RequestUtil (); > > use Apache2::ServerRec (); > use Apache2::ServerUtil (); > use Apache2::Connection (); > use Apache2::Log (); > > use APR::Table (); > > use ModPerl::Registry (); > use ModPerl::PerlRun (); > > use Apache2::Const -compile => ':common'; > use APR::Const -compile => ':common'; > > use lib qw(xxxxxxx); > > use Apache2::Status; > use Apache::DBI (); > use DBI (); > > our $db_attrs = {RaiseError=>1, PrintError=>0, Taint=>1, AutoCommit=>0}; > Apache::DBI->connect_on_init("DBI:mysql:db;host=x", 'y', 'z', $db_attrs); > > -- > END > --------------------------------------------------------- > What doesn't kill us, can only make us stronger. > Nothing is impossible. > > Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 > Consultant / http://p6m7g8.net/Resume/resume.shtml > Senior Developer / Liquidity Services, Inc. > http://www.liquidityservicesinc.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
