[MTOS-dev] Modperl 2 support?

Brad Choate brad at sixapart.com
Thu Dec 13 17:22:33 PST 2007


Yes, there should be a separate perl module that does all the 'use'  
statements to preload the MT modules and modules for installed  
plugins. The '@INC' path should be set up there as well to include  
locations of any modules that are to be loaded on the fly. This is  
tricky to generalize.

Any MT::App application (like MT::App::CMS, MT::App::Search, etc. and  
MT::AtomServer) can be registered as a Perl handler. The old MT 3.2  
manual has instructions on how to set this up[1]. These instructions  
have fallen behind as we've been encouraging FastCGI over mod_perl for  
some time (for one, it's more commonly supported for shared hosting  
users, but also because of our lack of mod_perl 2 support and FastCGI  
runs on Apache 1 and 2).

But we'd be happy to resurrect our support for mod_perl 1 and would  
love to see mod_perl 2 support! The more options available to run MT  
persistently, the better!

-Brad


[1]: http://www.sixapart.com/movabletype/docs/3.2/11_advanced_topics/mod_perl.html


On Dec 13, 2007, at 5:00 PM, Alvar Freude wrote:

> Hi,
>
> -- Vincent Veselosky <veselosky at gmail.com> wrote:
>
>> Is anyone currently working on MT support for mod_perl 2? If not, I
>> would consider taking a crack at it myself. From a quick grep through
>> the code, it looks like in the MT code itself the Modperl-specific
>> stuff is pretty well isolated. Can't speak about the external  
>> modules,
>> but I hope they won't get in the way.
>
> MT 4 does not work out of the box even with mod_perl 1!
>
> I tried it and after several tests I had a running system, but not  
> everything was working.
>
> It would be very good, it MT works with mod_perl, because in a good  
> environment it eats less memory then FastCGI and can be very fast  
> (when no slow SQL or an ORM wrapper with dozens of SQL queries is  
> used ;-) ).
>
>
>
> To get MT partly working with mod_perl 1:
>
> use most modules in a startup.pl (including plugins!), to get them  
> shared between all Apache processes. MT uses often "require" for  
> loading them at runtime, which is really no good idea with mod_perl,  
> because then their memory is not shared!
>
> And in the httpd.conf (or better: an include file!) put the following:
>
>
> <Perl>
> $ENV{MT_CONFIG} = '/path/to/mt/mt-config.cgi';
> eval "use MT::Bootstrap App => 'MT::App::CMS'";
> </Perl>
>
>
> There you also should define all the Apache Handlers and set the  
> names of the scripts in mt-config.cgi.
>
>
> I had some troubles and deactivated it. :(
>
>
> Ciao
> Alvar
>

--
Brad Choate
Engineering Manager, Movable Type, Six Apart, Ltd.
http://www.sixapart.com/movabletype/
Mobile: (918) 271-0105  -  AIM: bschoate



More information about the MTOS-dev mailing list