diff -pru lib/MT/App/CMS.pm lib/MT/App/CMS.pm
--- lib/MT/App/CMS.pm	2008-10-17 04:11:02.000000000 +0200
+++ lib/MT/App/CMS.pm	2009-03-16 11:33:31.000000000 +0100
@@ -5643,7 +5643,7 @@ sub list_plugins {
     $param{switched} = 1 if $app->param('switched');
     $param{'reset'} = 1 if $app->param('reset');
     $param{saved} = 1 if $app->param('saved');
-    $param{mod_perl} = 1 if $ENV{MOD_PERL};
+    $param{mod_perl} = 1 if exists $ENV{MOD_PERL};
     $app->add_breadcrumb($app->translate("Plugins"));
     $param{nav_plugins} = 1;
     $app->build_page('list_plugin.tmpl', \%param);
diff -pru lib/MT/App.pm lib/MT/App.pm
--- lib/MT/App.pm	2008-08-06 06:30:08.000000000 +0200
+++ lib/MT/App.pm	2009-03-16 11:09:35.000000000 +0100
@@ -133,10 +133,10 @@ sub print {
 
 my $TransparentProxyIPs = 0;
 
-sub handler ($$) {
+sub handler ($$) : method {
     my $class = shift;
     my($r) = @_;
-    require Apache::Constants;
+    require Apache::Constants if ($ENV{MOD_PERL}) ;
     if (lc($r->dir_config('Filter') || '') eq 'on') {
         $r = $r->filter_register;
     }
@@ -1222,7 +1222,7 @@ sub static_path {
 sub script {
     my $app = shift;
     return $app->{__script} if exists $app->{__script};
-    my $script = $ENV{MOD_PERL} ? $app->{apache}->uri : $ENV{SCRIPT_NAME};
+    my $script = exists $ENV{MOD_PERL} ? $app->{apache}->uri : $ENV{SCRIPT_NAME};
     if (!$script) {
         require File::Basename; import File::Basename qw(basename);
         $script = basename($0);
diff -pru lib/MT/Template/ContextHandlers.pm lib/MT/Template/ContextHandlers.pm
--- lib/MT/Template/ContextHandlers.pm	2008-08-01 03:13:35.000000000 +0200
+++ lib/MT/Template/ContextHandlers.pm	2007-04-17 09:18:04.000000000 +0200
@@ -882,7 +888,7 @@ sub _hdlr_product_name {
         $short_name = MT->translate("Movable Type");
     }
     if ($args->{version}) {
-        return MT->translate("[_1] [_2]", $short_name, MT->version_id);
+        return MT->translate("[_1] [_2]", $short_name, join ' ', MT->version_id, (exists $ENV{MOD_PERL_API_VERSION} ? 'mod_perl/'.$ENV{MOD_PERL_API_VERSION} : exists $ENV{MOD_PERL} ? $ENV{MOD_PERL} : ()));
     } else {
         return $short_name;
     }
diff -pru lib/MT/XMLRPCServer.pm lib/MT/XMLRPCServer.pm
--- lib/MT/XMLRPCServer.pm	2008-08-01 03:13:35.000000000 +0200
+++ lib/MT/XMLRPCServer.pm	2007-04-17 09:18:04.000000000 +0200
@@ -11,14 +11,16 @@ use MT::Util qw( offset_time_list );
 use MT::I18N qw( encode_text first_n_text const );
 
 sub mt_new {
-    my $cfg = $ENV{MOD_PERL} ?
+    my $cfg = $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} >= 2 ?
+	Apache2::RequestUtil->request()->dir_config('MTConfig') :
+	$ENV{MOD_PERL} ?
         Apache->request->dir_config('MTConfig') :
         $MT::XMLRPCServer::MT_DIR . '/mt.cfg';
     my $mt = MT->new( Config => $cfg )
         or die MT::XMLRPCServer::_fault(MT->errstr);
     #$main::server->serializer->encoding($mt->config('PublishCharset'));
     # we need to be UTF-8 here no matter which PublishCharset
-    $main::server->serializer->encoding('UTF-8');
+    #$main::server->serializer->encoding('UTF-8');
     $mt;
 }
 

