[Rt-commit] rt branch, 4.0/die-on-perl-script-handler, created. rt-4.0.6-126-g6f26593

Jim Brandt jbrandt at bestpractical.com
Fri Mar 1 16:44:43 EST 2013


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

- Log -----------------------------------------------------------------
commit 6f265932f849a3502623efe8e91261b6e30adcad
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 4b64d2e..82852b0 100644
--- a/docs/UPGRADING-4.0
+++ b/docs/UPGRADING-4.0
@@ -21,10 +21,14 @@ command like the 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
+L<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`. L<docs/web_deployment.html/"mod_perl-2.xx"> contains the
+new configuration.
+
 *******
 RT_SiteConfig.pm
 
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 45c3770..c0b7245 100755
--- 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