MovableType 3.2 has five beta versions, I tested some on my windows 2000 windows XP machines. They all fine.
When Six Apart release the final version 3.2, I installed it immediately on my Windows 2000. It run smoothly on it. Tests included brand new install and upgrade from Movable Type 3.17.
On August 26, 2005, I upload all files into my Windows Server 2003. Modified setting fies according to the Docs. It failed.
Gave me the following errors:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

After 4 days research and a lot of tests and some modifications for the native Movable Type 3.2 files. I got the solution.


This problem is only happened on Windows server 2003, webserver is IIS 6.0, ActivePerl environment. That is my server’s settings.
Ok, if you met the same problem in the similar machine, do the following steps.
Fisrt of all, according to the guide of Installing Movable Type on Windows
, install everything.
Here is the zip file you need to remove the errors.
mt32patch2k3.zip Download file
Download it and unzip it, save them into your mt root folder, confirm to replace the origrinal files.
After that, the MovableType 3.2 can work on the Windows 2003 Server.
Following tests are passed: Installation, Upgrade, Add Category, Upload files, Create Folder, Comments, Trackback, Search, Autofind Trackback, Add Notification, Make Image Thumbnail.
I also want to explain the modifications and try to explain the bugs.
Before Movable Type 3.2 Beta3, the MT system use the following scripts to add directory.

my($MT_DIR);
BEGIN {
if ($0 =~ m!(.*[/\\])!) {
$MT_DIR = $1;
} else {
$MT_DIR = './';
}
unshift @INC, $MT_DIR . 'lib';
unshift @INC, $MT_DIR . 'extlib';
}

When the Movable Type 3.2 Beta3 release, they changed it to:

>use lib 'lib';

This one works on all windows box except Windows 2003, see the error reported on their beta 3 post first reported by Iain Stewart on August 7, 2005. Until the final release, this error still happen on the Windows 2003 server.
They use the simply script to replace the long one. I checked the ActivePerl 5.8.7 build 813 Documentation. Under Pragmas — Lib section, a good detailed sentence tell the truth:

Adding directories to @INC
The parameters to use lib are added to the start of the perl search path. Saying
use lib LIST;
is <em>almost</em> the same as saying
BEGIN { unshift(@INC, LIST) }

Look, the “almost” is italic on the original documentation. That means it must contain some differences. I used all my fingers to search the difference. I am not a Perl programer. I got nothing to explain the difference, but I trust the difference happened on the Windows 2003.
Finally, I use the script from the mt-check.cgi file shipped with Movable Type 3.2 which works without modification.

BEGIN {
my $dir;
require File::Spec;
if (!($dir = $ENV{MT_HOME})) {
if ($0 =~ m!(.*[/\\])!) {
$dir = $1;
} else {
$dir = './';
}
$ENV{MT_HOME} = $dir;
}
unshift @INC, File::Spec-&gt;catdir($dir, 'lib');
unshift @INC, File::Spec-&gt;catdir($dir, 'extlib');
}

to replace the script in the files:

use lib 'lib';

Any experts of Perl language can tell the difference will be very appreciated.
This patch file is made by myself and not authorized by Six Apart. I do not want to break the license. I send it out to help the others with same troubles.
You still can edit the code yourself, just following the above guide.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

9 Replies to “MovableType 3.2 on Windows 2003

  1. 總算是弄好了大半了……

    經過4天時閒的失敗,昨天晚上總算是把Movable Type裝上了,今天早上調試終了,中午設置終了,現在還在繼續修改配色問題。 其實本來最初就是打算用在這裡抓回來的Movable Type版本2.6,結果由於Apache出現問題而放棄,然後轉爲Plog,但MySQL由於某些原因使用不能,無奈之下繼續使用Movable Type版本3.2,但是出現新的CGI問題,但是這裡同時也給出了解決的方法,所以現在一切順利。 現在考慮修改配色,但是對CSS檔完全沒有任何認識的我也就沒有辦法正確的修改,所以看來還是…

  2. MovableType 3.3 β2入れようとしたんだけど

     期待のMT3.3を試すために新しいVPCイメージを作って新規インストールしてみ…

  3. 大迁移,Win 2003下安装Movable Type

    华夏名网的虚拟主机总是令人不爽,时不时会出现一些莫名其妙的问题,这不,前天开始连文章都不能保存了!无奈之下,只能求助于历历,正好要给蔫老虎乐园群建立一个相册,干脆都转移…

  4. MT 3.2 sucks monkeyballs

    this title is not completely true. it’s actually really slick. IF you get it working. getting it working on a non-windows server is cake. upload the stuff, unpack it, edit the mt-config.cgi file, then open up ../mt.cgi and you’re…

Leave a Reply

Your email address will not be published. Required fields are marked *