Hello everyone, I've set mod_perl up with Apache::DBI on several servers, both with mod_perl from RPM's and building it myself, but I am having a horrible time with a new server I've just built. Go easy, I'm still new at it, though. And I welcome any and all constructive criticism for my config files, etc.
Here are the specs: RH 7.3, mod_perl 1.2.6 from RPM, Apache::DBI 0.92, DBI 1.37. Now, here's what I'm defining in httpd.conf: <snip httpd.conf> <IfModule mod_perl.c> Alias /perl /var/www/perl <Directory /var/www/perl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI </Directory> #PerlHandler HTML::Mason::ApacheHandler PerlSetVar MasonCompRoot /var/www/html/mason PerlSetVar MasonDataDir /var/mason PerlSetVar MasonAllowGlobals $dbh #PerlAddVar MasonAllowGlobals $session #PerlAddVar MasonAllowGlobals %session #PerlAddVar MasonAllowGlobals $sys #PerlSetVar MasonRequestClass MasonX::Request::WithApacheSession #PerlSetVar MasonSessionClass Apache::Session::File #PerlSetVar MasonSessionDirectory /tmp/sessions #PerlSetVar MasonSessionLockDirectory /tmp/sessions PerlSetEnv DBI_TRACE "3=/tmp/dbitrace.log" PerlRequire /etc/httpd/conf/startup.pl #PerlModule Apache::DBI AddType text/html .mhtml AddType text/html .mason <Location /mason> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler Options +ExecCGI </Location> </IfModule> </snip httpd.conf> Here's my startup.pl: <snip startup.pl> #!/usr/bin/perl use warnings; use strict; # Extend @INC if needed #use lib qw(/dir/foo /dir/bar); use lib qw(/var/www/html/mason/lib); use lib qw(/var/www/html/mason/hrtime/lib); use vars qw($dbh %session); # Make sure we are in a sane environment. $ENV{MOD_PERL} or die "not running under mod_perl!"; # For things in the "/perl" URL use Apache::Registry; #$KO::server_root = "/var/www/html/mason/db"; #use KO::DBI::Connect qw(:all); # Load Perl modules of your choice here # This code is interpreted *once* when the server starts use LWP::UserAgent (); #use Apache::DBI (); use DBI(); # Tell me more about warnings use Carp(); $SIG{__WARN__} = \&Carp::cluck; # Load CGI.pm and call its compile() method to precompile # (but not to import) its autoloaded methods. use CGI (); CGI->compile(':all'); # Initialize the database connections for each child =pod Apache::DBI->connect_on_init ("DBI:Pg:dbname=auth;host=localhost;port=5432", "root","", { PrintError => 1, # warn() on errors RaiseError => 0, # don't die on error AutoCommit => 1, # commit executes immediately } ); =cut 1; </snip startup.pl> What's happening is that with "use Apache::DBI" uncommented in either the httpd.conf or startup.pl Apache does not start. This is what error_log reports: [Thu Aug 14 14:59:49 2003] [notice] Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 mod_perl/1.26 mod_throttle/3.1.2 configured -- resuming normal operations [Thu Aug 14 14:59:49 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Aug 14 14:59:49 2003] [notice] Accept mutex: sysvsem (Default: sysvsem) [Fri Aug 15 10:08:43 2003] [notice] caught SIGTERM, shutting down When I try to pull up anything the connection is refused (because the server is down). I've just been commenting and uncommenting stuff until it worked. The weird thing is that there are no real error messages from mod_perl in the apache logs. Can anyone help? Thanks, Kevin -- K Old <[EMAIL PROTECTED]> -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html