web/tech: August 2007 Archives

Movable Type 4 Sandbox

| | Comments (0)
Since I upgraded to Movable Type 4 on this site last week and had a few issues with modifying my templates to utilize the full benefits of MT4's new tags and approach to modularizing the templates further. I decided that it would probably be a very wise choice to have an implementation to play with here at home. Doing this serves several purposes:

  • First: I can make changes to the site without getting egg all over my face.
  • Second: I can see how my site will react to the changes I make and experiment with it until I am satisfied with the outcome.
  • Third: I can modify the source code or develop plug-ins and test them in an environment that is self-contained
In order to install this "sandbox" there's a few things you will need:
  1. A database: MT is compatible with quite a few database engines. I chose to use MySQL. I've used it for years and I've always been very satisfied with its performance.
  2. PHP: If you decide to use "dynamic publishing" you will need this. But that is not absolutely required.
  3. Perl: MT's engine is based on Perl so you can't get around this.
  4. A web server: I use Apache. But you can use IIS if you absolutely have to.
There's numerous sources you can find that will provide great tutorials on installing each of the above, so I'm not going to go into that. However, I advise the following sequence especially if you are using Windows as your OS:

  1. Install your database.
  2. Install your web server
  3. Install PHP using the windows installer. The installer will automatically configure your webserver to use PHP.
  4. Install Perl
  5. At this point you should probably make sure that Perl came with the necessary libraries to connect to your database. Mine didn't and I did not know this until I tried installing MT. However, the Perl Package Manager made it easy to get and install.
  6. Now you're ready to install MT4.
Once you have the database, web server, PHP and Perl installed it's as simple as placing the contents of the respective MT4 files in your cgi folder and and the root of your webserver. ( Note that this is not the most complex setup. I'm not using any virtual hosts or anything like that. It's simply a sandbox that mirrors the general makeup of my actual website. ) One little gotcha that you might run into right as you're all ready to start installing MT4 ( on Windows ) . . . Even if you download the windows .zip containing the MT4 package: Each Perl script contains the following directive in order to tell Apache how to execute the script:
#! /usr/bin/perl
If you install on Windows this directive will not work on a Windows machine. What you will probably receive is the following in your Apache error logs: "The system cannot find the path specified. : couldn't spawn child process: C:/Program Files/Apache Group/Apache2/cgi-bin/mt/mt.cgi" So, what your need to do is go into each of MT's .cgi files and replace that directive with something like this:
#!c:\perl\bin\perl.exe
What you are doing is telling Apache that the appropriate executable that knows how to execute Perl script resides at this place - where this place is the path to your perl.exe. Once that is in place - and your other installations are in place - the MT installation is a snap. Good Luck.

About this Archive

This page is a archive of entries in the web/tech category from August 2007.

web/tech: June 2007 is the previous archive.

web/tech: September 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.