Underground activity in Tweezerman's lair


This weblog has been quiet for a while, but not for the lack of anything to write about.

I've been spending a lot of time helping users with MT in the MT Forums. With the release of MT3D in May, then MT 3.01 a few weeks ago, the forums have been pretty active with users facing installation and upgrade issues, as well as issues with the new features in MT3.

Before MT 3.01 was released, I thought it would be a good idea to have a local installation of MT to test anything I wanted to on it (like new template designs or plugin code) without disturbing anything on the MT installation on my host account.

I'm running WinXP Home here (which wasn't a plus for this task), and already had ActivePerl installed. Two other pieces were needed - Apache for the web server (there's no way in hell I'll ever run IIS), and MySQL for the database server (again, there's no way in hell I'll ever run MT with Berkeley DB for the database).

I also needed some sort of MySQL client that would allow me to look at and administer the MySQL database. I thought I was going to have to install PHP and phpMyAdmin for this until I found the MySQL Control Center on the MySQL website. One thing I like about the MySQL Control Center is that I can also use it to connect to the MySQL server on my host account as well to look at the database and tables, run queries, and do some administrative things (but not quite everything).

I've never installed or run my own Apache or MySQL server before, let alone on Windows, so it was somewhat of a steep learning curve for me, getting it all installed and configured properly.

Just for an extra challenge, I decided I wanted my local install of MT to be able to use ImageMagick to create image thumbnails. I chronicled that adventure in the MT Forums.

I was able to install and run MT here (both MT 2.661 and MT3), but the response time to serve a page was pretty slow. I attributed this to 1) Windows, 2) not running Apache on a dedicated server, and 3) relatively slow CPU (800 MHz). Supposedly, running the Apache server (and MT) under mod_perl would give a substantial speed boost.

Despite what the MT mod_perl documentation says, it took more than adding some settings to Apache's httpd.conf file to get it working. After lots of reading and trial and error, I added some extra settings not mentioned in the instructions plus modified one line in every MT .cgi script. (I really should document what I did and why sometime.)

I have MT3 running under mod_perl now, and it serves pages as fast or faster than MT3 on my host account. My MT2 install is not running under mod_perl - I am keeping it primarily for keeping MT-Blacklist up to date until MT-Blacklist 2.0 is released, but MT-Blacklist is not compatible with mod_perl.

Not too long after I finished all of this and was looking forward to working with this new setup, Rhye's subscription to Radio UserLand expired. She had been experimenting with a free trial TypePad weblog in anticipation, wanting to see how easy it was to use compared to Radio. Now she wanted to switch to MT and have her MT weblog look like her TypePad weblog.

Besides seeing TypePad up close and personal for the first time, I learned some of the basics for SSI (server-side includes), and figured out how to use a handful of Apache mod_rewrite directives to keep existing links to Rhye's weblog pages from being broken.

While I was working on converting Rhye's weblog to MT, MT 3.01D was released. A new version requiring upgrades to templates, plus figuring out what's been fixed, what's been added, what's changed, and what's still broken.

There's more I have in mind that I'd like to tackle in the future (if I ever get the time and energy to put into them). I have ideas for two MT3 plugins (which I can work on now in my new development environment). My ImageInfo plugin could use an MT3 facelift. I've been thinking about creating a separate new weblog, dedicated solely to Movable Type and posting tips, tricks, explanations and solutions for error messages, MT news, links to new MT3 plugins, etc. (But I think if I was smart, I'd consider contributing to the MT Wiki instead - no need to reinvent the wheel.) I'm thinking that this weblog needs a facelift too, but I don't know yet what I want it to look like.

No rest for the wicked, it seems... :)


I'm actually in the process of re-inveting the wheel as you put it :P I'm designing and creating a MT tips, tricks etc. blog but it will be targetted to advanced users of MT that are bored with their install and want to do something more with it ! ATM The design has been completely stolen from MT.cgi not yet heard back from 6A whether they'll let me use it - probably not. But to get a sneak peek check out http://movalog.arvind-satya.com/ !

I would be really interested to know what you had to do to get everything working with mod_perl. I am using Apache on WinXP and ActivePerl at the moment, and never knew that mod_perl would speed things up. But your mentioning that you had to do somethings that were not documented has me wary at the moment. Thanks for any help you can give!

You can look at my MT Forums post for the details of what I initially did and why.

Some time after I made that entry, I slightly changed what I used in my httpd.conf file. I wanted to have a second, parallel install of MT 2.661 so I could use MT-Blacklist to keep my blacklist up to date until MT-Blacklist 2.0 is released. Unfortunately, the current version of MT-Blacklist (v1.65) does not run under mod_perl. The <Perl> block I described in my MT Forums post is a global setting - the library paths configured would be used for all MT installs.

To configure library paths only for a specific directory under mod_perl, I had to get rid of the <Perl> section in the httpd.conf and replace it with a "PerlSetEnv PERL5LIB" setting within the <Location> block.

This is what I'm currently using in my httpd.conf:

PerlModule Apache
PerlModule Apache::Registry

<Location /cgi-bin/mt3>
  SetHandler perl-script
  PerlHandler Apache::Registry
  PerlSetEnv PERL5LIB 'C\:/Apache/cgi-bin/mt3/lib:C\:/Apache/cgi-bin/mt3/extlib'
  Options +ExecCGI
  PerlSendHeader On

In the "PerlSetEnv PERL5LIB" setting, the MT /lib and /extlib directories both need to be specified, using the appropriate path separator. In Windows, this is ":". Also in Windows, the ":" immediately after a drive letter must be escaped with a backslash ("C\:") so it is not interpreted as a path separator.