diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2012-02-23 21:41:47 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2012-02-23 21:41:47 +0100 |
commit | 37a663a5b9827c6cd4ed2c26a61564ea98d078b4 (patch) | |
tree | 22071cc4a70210a1aa29a701c37b22293cfae283 /mod_perl.pl | |
parent | Bump to 4.0.4 (diff) | |
download | bugzilla-37a663a5b9827c6cd4ed2c26a61564ea98d078b4.tar.gz bugzilla-37a663a5b9827c6cd4ed2c26a61564ea98d078b4.tar.bz2 bugzilla-37a663a5b9827c6cd4ed2c26a61564ea98d078b4.zip |
Update to 4.2.
Diffstat (limited to 'mod_perl.pl')
-rw-r--r--[-rwxr-xr-x] | mod_perl.pl | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/mod_perl.pl b/mod_perl.pl index f96156724..f3dae34c1 100755..100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -16,7 +16,6 @@ # Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org> package Bugzilla::ModPerl; - use strict; use warnings; @@ -36,30 +35,33 @@ use lib Bugzilla::Constants::bz_locations()->{'ext_libpath'}; # startup, so we always specify () after using any module in this # file. +use Apache2::Log (); use Apache2::ServerUtil; use ModPerl::RegistryLoader (); -use CGI (); -CGI->compile(qw(:cgi -no_xhtml -oldstyle_urls :private_tempfiles - :unique_headers SERVER_PUSH :push)); use File::Basename (); -use Template::Config (); -Template::Config->preload(); - -# For PerlChildInitHandler -eval { require Math::Random::Secure }; +# This loads most of our modules. use Bugzilla (); +# Loading Bugzilla.pm doesn't load this, though, and we want it preloaded. +use Bugzilla::BugMail (); use Bugzilla::CGI (); use Bugzilla::Extension (); use Bugzilla::Install::Requirements (); -use Bugzilla::Mailer (); -use Bugzilla::Template (); use Bugzilla::Util (); +use Bugzilla::RNG (); + +# Make warnings go to the virtual host's log and not the main +# server log. +BEGIN { *CORE::GLOBAL::warn = \&Apache2::ServerRec::warn; } + +# Pre-compile the CGI.pm methods that we're going to use. +Bugzilla::CGI->compile(qw(:cgi :push)); use Apache2::SizeLimit; # This means that every httpd child will die after processing -# a CGI if it is taking up more than 70MB of RAM all by itself. -Apache2::SizeLimit->set_max_unshared_size(70_000); +# a CGI if it is taking up more than 45MB of RAM all by itself, +# not counting RAM it is sharing with the other httpd processes. +Apache2::SizeLimit->set_max_unshared_size(45_000); my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; @@ -67,13 +69,11 @@ my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; my $server = Apache2::ServerUtil->server; my $conf = <<EOT; # Make sure each httpd child receives a different random seed (bug 476622). -# Math::Random::Secure has one srand that needs to be called for +# Bugzilla::RNG has one srand that needs to be called for # every process, and Perl has another. (Various Perl modules still use -# the built-in rand(), even though we only use Math::Random::Secure in -# Bugzilla itself, so we need to srand() both of them.) However, -# Math::Random::Secure may not be installed, so we call its srand in an -# eval. -PerlChildInitHandler "sub { eval { Math::Random::Secure::srand() }; srand(); }" +# the built-in rand(), even though we never use it in Bugzilla itself, +# so we need to srand() both of them.) +PerlChildInitHandler "sub { Bugzilla::RNG::srand(); srand(); }" <Directory "$cgi_path"> AddHandler perl-script .cgi # No need to PerlModule these because they're already defined in mod_perl.pl |