From 247f276ed03f305139db95dade2dc4e618aaf50c Mon Sep 17 00:00:00 2001 From: Brian Conry Date: Tue, 29 Oct 2024 12:32:09 -0500 Subject: [PATCH] Probably less-than-useful WIP The code in this commit had been sitting uncommitted since December 2021. It is the code referenced in comments on the task ticket as having broken testing. --- lib/RT/Interface/Web/Handler.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm index dd6fc318017..9174c001efe 100644 --- a/lib/RT/Interface/Web/Handler.pm +++ b/lib/RT/Interface/Web/Handler.pm @@ -246,6 +246,31 @@ MODPERL return $res; } +=head1 CheckMPMConfiguration + +Make sure we're running with the 'prefork' MPM. + +=cut + +sub CheckMPMConfiguration { + my $self = shift; + eval `require Data::Dumper`; + + if ($CGI::MOD_PERL and $CGI::MOD_PERL >= 2 ) { + if( eval 'use Apache2::Const -compile => qw(:mpmq)' and eval 'require Apache2::MPM' ) { + eval 'Data::Dumper::Dumper( \*Apache2::Const::MPMQ_IS_THREADED )'; + #my $mpm_type = Apache2::MPM->query(Apache2::Const::MPMQ_IS_THREADED); + #die Data::Dumper::Dumper( $mpm_type ); + } + else { + die "have mod_perl >= 2, but error pulling in Apache: '$@', '$!'"; + } + } + else { + die "don't seem to be apache"; + } +} + # PSGI App use RT::Interface::Web::Handler;