diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2012-02-23 23:50:41 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2012-02-23 23:50:41 +0100 |
commit | 3faa5aeb86deb1af7812ca6206b54b2fb3cc23da (patch) | |
tree | 1f41ef32a009cf512fde56e9974c119375071453 /mod_perl.pl | |
parent | Revert "Temporary fix/workaround for Use of uninitialized value in concatenat... (diff) | |
parent | Update to 4.2. (diff) | |
download | bugzilla-3faa5aeb86deb1af7812ca6206b54b2fb3cc23da.tar.gz bugzilla-3faa5aeb86deb1af7812ca6206b54b2fb3cc23da.tar.bz2 bugzilla-3faa5aeb86deb1af7812ca6206b54b2fb3cc23da.zip |
Merge branch 'upstream' into update
Conflicts:
Bugzilla/BugMail.pm
Bugzilla/Search/Quicksearch.pm
mod_perl.pl
template/en/default/attachment/createformcontents.html.tmpl
template/en/default/attachment/edit.html.tmpl
template/en/default/bug/format_comment.txt.tmpl
template/en/default/email/bugmail.txt.tmpl
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 0336feff6..0a45c05e1 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,33 +35,36 @@ 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::Log (); *CORE::GLOBAL::warn = \&Apache2::ServerRec::warn; 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); Apache2::SizeLimit->set_max_unshared_size(500_000); my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; @@ -71,13 +73,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 |