[Rt-commit] rt branch, 4.0/die-on-perl-script-handler, created. rt-4.0.10-79-g3c250e8

Alex Vandiver alexmv at bestpractical.com
Mon Mar 11 15:04:04 EDT 2013


The branch, 4.0/die-on-perl-script-handler has been created
        at  3c250e869b7d5f15e94518f895ce7c3b0d635f23 (commit)

- Log -----------------------------------------------------------------
commit 3c250e869b7d5f15e94518f895ce7c3b0d635f23
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu May 24 14:42:01 2012 -0400

    Die when detecting SetHandler perl-script

diff --git a/docs/UPGRADING-4.0 b/docs/UPGRADING-4.0
index f884c52..b95610b 100644
--- a/docs/UPGRADING-4.0
+++ b/docs/UPGRADING-4.0
@@ -24,9 +24,13 @@ following to remove the _Overlay files:
     find /opt/rt3/lib/ -type f -name '*_Overlay*' -delete
 
 RT has also changed how web deployment works; you will need to review
-docs/web_deployment.pod for current instructions.  The old `fastcgi_server`,
-`webmux.pl`, and `mason_handler.*` files will not work with RT 4.0, and should
-be removed to reduce confusion.
+F<docs/web_deployment.pod> for current instructions.  The old
+`fastcgi_server`, `webmux.pl`, and `mason_handler.*` files will not
+work with RT 4.0, and should be removed to reduce confusion.
+
+If you deploy RT with mod_perl, Apache will no longer start with C<SetHandler>
+set to `perl-script`. F<docs/web_deployment.pod> contains the
+new configuration.
 
 
 =head2 RT_SiteConfig.pm
diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod
index 355f6ce..5a9bd93 100644
--- a/docs/web_deployment.pod
+++ b/docs/web_deployment.pod
@@ -114,8 +114,9 @@ deployment if your privileged users are in a different timezone than the
 one the server is configured for.
 
 B<NOTE>: RT 3.8 and below suggested use of C<SetHandler perl-script>;
-this is incorrect for RT 4, and will lead to difficulties sending
-outgoing mail from RT.  Ensure that you use C<SetHandler modperl>.
+this is incorrect for RT 4, and (starting in RT 4.0.11) RT will refuse
+to start, to prevent difficulties sending mail from RT.  Change to
+C<SetHandler modperl>, as the example below uses.
 
     <VirtualHost rt.example.com>
         ### Optional apache logs for RT
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 632ba0b..0fa2bbe 100644
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -57,6 +57,28 @@ line, or remove the PerlTaintCheck parameter from your mod_perl
 configuration.
 EOT
 
+    my $handler;
+    # Plack::Handler::Apache2 masks MOD_PERL, so use MOD_PERL_API_VERSION
+    if( $ENV{MOD_PERL_API_VERSION}
+        and $ENV{MOD_PERL_API_VERSION} == 2){
+
+        eval{
+            require Apache2::RequestRec;
+            $handler = Apache2::RequestRec->handler();
+        };
+    }
+
+    die <<MODPERL if defined $handler && $handler eq 'perl-script';
+RT has problems when SetHandler is set to perl-script.
+Change SetHandler in your in httpd.conf to:
+
+    SetHandler modperl
+
+For a complete example mod_perl configuration, see:
+
+https://bestpractical.com/rt/docs/@{[$RT::VERSION =~ /^(\d\.\d)/]}/web_deployment.html#mod_perl-2.xx
+MODPERL
+
     require File::Spec;
     my @libs = ("@RT_LIB_PATH@", "@LOCAL_LIB_PATH@");
     my $bin_path;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list