2005年09月11日

XreaにMT3.2をインストール:バグ報告

ブログエンジンを b2evolution から、 Movable Type 3.2(en) に切り替えてみました。この e8y.net は今粋なサーバ屋 XREA で運用しているのですが、一個問題を見つけたのでpatchを載せておきます。

まずMTのインストールで、最初に <パス>/mt-check.cgi にアクセスして、関連モジュールのチェックをすると思うのですが、その mt-check.cgi が Xrea では以下のようにコケて見れません(泣)

Script Error

The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run thisscript under CGIWrap debugging. Usually, either rename or linkthe script temporarily to a file which ends with .cgidextension, or add a AddHandler cgi-script-debug .cgiline to your .htaccess file.

これが出る理由は簡単で、 seless use of private variable in void context ワーニングが出ているからです。以下のように修正すれば問題なくモジュールのチェックができます。

日本語版3.2ベータ1の場合

mt-check.cgi の 330行目 $dbi_is_okay if $mod eq 'DBI';$dbi_is_okay = 1 if $mod eq 'DBI'; に変える(= 1を加えるだけ)

MT-3.2-b1-ja/mt-check.cgi へのpatch

--- mt-check.cgi    Fri Sep  9 06:30:14 2005
+++ mt-check.cgi.new    Sun Sep 11 10:05:54 2005
@@ -327,7 +327,7 @@
             print $msg . "\n\n";
         } else {
             if ($data) {
-                $dbi_is_okay if $mod eq 'DBI';
+                $dbi_is_okay = 1 if $mod eq 'DBI';
                 if ($mod eq 'DB_File') {
                     $got_one_data = 1;
                 } elsif ($mod ne 'DBI') {
英語版3.2の場合

このサイトではとりあえず英語版を入れているのですが、同じ問題が発生します。同様の箇所(318行目)を修正します。

MT-3.2-en_US/mt-check.cgi へのpatch

--- mt-check.cgi    Fri Aug 26 02:20:39 2005
+++ mt-check.cgi.new    Sun Sep 11 09:58:15 2005
@@ -315,7 +315,7 @@
             print wrap("        ", "        ", $msg), "\n\n";
         } else {
             if ($data) {
-                $dbi_is_okay if $mod eq 'DBI';
+                $dbi_is_okay = 1 if $mod eq 'DBI';
                 if ($mod eq 'DB_File') {
                     $got_one_data = 1;
                 } elsif ($mod ne 'DBI') {

バグ報告はトラックバックで、とのことなのでトラックバック。

ほかのページならともかく、最初に試そうとする箇所なのでここでつまずいてMT3.2をあきらめてしまう人がいないことを願います

ほかは問題なく使えてます(たぶん) おしゃれな管理画面、いい感じです。


TrackBack

Comments

コメントをどうぞ


冨田尚樹
Naoki Tomita
loading from twitter
たぶん人気なもの
del.icio.us/scrap
今日のCPANモジュール
とみた広報
Syndicate this site
Syndicate this site
あわせて読みたい なかのひと