<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Memo</title>
      <link>http://player.s203.xrea.com/memo/</link>
      <description></description>
      <language>ja</language>
      <copyright>Copyright 2008</copyright>
      <lastBuildDate>Fri, 15 Jun 2007 20:34:17 +0900</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.2-ja-2</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>XREA.COM に設置した MovableType で指定日投稿をしてみた。</title>
         <description><![CDATA[指定日投稿をするには、CRON を利用しますので、プラスサービス（有料）の環境が必要です。
また、注意点として、指定日投稿では更新ping が送られないようです。

僕の環境は、
サーバー名 ： s238.xrea.com
Movable Type バージョン ： 3.33-ja
で、以下の説明で、
ID ： <font color="red">player</font>
MTのパス ： /virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>
としています。

指定日投稿は、<font color="red">blog</font>/tools/ の中にある、run-periodic-tasks というスクリプトによって公開されます。
その run-periodic-tasks を動作させるスクリプト <font color="red">mt-tasks.sh</font> （名前はお好きなもので）を作成し、それを CRON に登録します。

①<font color="red">mt-tasks.sh</font> を作成する。
#!/bin/sh
#PERL
/usr/local/bin/perl /virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/tools/run-periodic-tasks
exit

②/virtual/<font color="red">player</font>/ に「<font color="red">script</font>」というフォルダを作り（お好きな名前で）、その中に <font color="red">mt-tasks.sh</font> を入れる。
つまり、
/virtual/<font color="red">player</font>/<font color="red">script</font>/<font color="red">mt-tasks.sh</font>

③<font color="red">mt-tasks.sh</font> のパーミッションを７００にする。

④<font color="red">mt-tasks.sh</font> を CRON に登録する。
「管理メニュー」の「CRONジョブ」で設定します。
そこに「CRONジョブの例」「シェルスクリプトの例」も載っているので参考にされるといいと思います。
僕の場合→<a href="http://player.s203.xrea.com/memo/sample.html" onclick="window.open('http://player.s203.xrea.com/memo/sample.html','popup','width=705,height=215,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">例</a>（３時間毎１５分に実行）

⑤記事投稿の際、「公開設定」を「指定日」にして、「投稿日」に希望の日時を入力。

⑥本来ならば、これでO.K.のはずなのですが、この状態ですと下記のようなエラーメールが送られてきます。

Can't locate MT/Bootstrap.pm in @INC (@INC contains: lib ../lib /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/tools/run-periodic-tasks line 11.
BEGIN failed--compilation aborted at /virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/tools/run-periodic-tasks line 11.

なので、run-periodic-tasks の１０行目
use lib 'lib', '../lib';
を
use lib 'lib', '/virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/lib';
というように絶対パス指定にします。

※もし、その他うまくいかなかったなら、<font color="red">mt-tasks.sh</font> の改行コード（「LF」にする）や run-periodic-tasks のパーミッション（僕は７０５にしてます）を確認してみて下さい。

追記：
Parsing of undecoded UTF-8 will give garbage when decoding entities at /virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/extlib/LWP/Protocol.pm line 204.
というエラーメールが届くようになりました。

LWPを最新のバージョンにしたらエラーが出なくなりました。
<a href="http://search.cpan.org/~gaas/libwww-perl/" target="_blank">libwww-perl</a>をダウンロード，解凍し、libの中にあるLWP以下を/virtual/<font color="red">player</font>/public_html/<font color="red">blog</font>/extlib/LWPと入れ替えます。

入れ替えると言っても、念のためモトを取っておいたほうが良いでしょうから、モトのLWPの名前を変更して、最新のLWPをアップロードして下さい。

次に、モトのLWPを参考にパーミッションを設定して完了です。ちなみに、僕の環境では、ファイル，ディレクトリとも全て７０５です。]]></description>
         <link>http://player.s203.xrea.com/memo/2007/06/xreacom_movabletype.html</link>
         <guid>http://player.s203.xrea.com/memo/2007/06/xreacom_movabletype.html</guid>
         <category></category>
         <pubDate>Fri, 15 Jun 2007 20:34:17 +0900</pubDate>
      </item>
            <item>
         <title>XREA.COM に MovableType を設置してみた。</title>
         <description><![CDATA[設置方法、メモっときます。

Movable Type バージョン 3.2-ja-2 で、MySQL 使用。
サイトURL：<font color="red">http://player.s203.xrea.com/memo/</font> の場合です。
つまり、ID：<font color="red">player</font>，サーバー名：<font color="red">s203</font> になります。
また、MTのCGIを設置するディレクトリ名は、<font color="red">blog</font> ，ID：<font color="red">player</font>のパスワードを <font color="red">PASSWORD</font> としています。
ブログの文字コードはUTF-8です。

<a href="http://www.xrea.com/" target="_blank">XREA.COM</a>　<a href="http://www.sixapart.jp/movabletype/" target="_blank">MovableType</a>
<hr />参考サイト様：大変助かりました。m(_ _)m

・<a href="http://www.sixapart.jp/movabletype/manual/mtmanual_install.html" target="_blank">Movable Typeユーザー・マニュアル: Movable Typeの新規インストール</a>
・<a href="http://yuzumoni.s56.xrea.com/" target="_blank">XREAでMTを！</a>
・<a href="http://iandeth.dyndns.org/mt/ian/archives/000112.html" target="_blank">Movable Type + MySQL 4.1 を組み合わせると日本語が文字化けする不具合／障害の解決方法 - iandeth.</a>
・<a href="http://www.xrea.com/files/install_mt_3.2.txt" target="_blank">自動設置CGI</a><hr />]]></description>
         <link>http://player.s203.xrea.com/memo/2006/03/mt_in_xrea.html</link>
         <guid>http://player.s203.xrea.com/memo/2006/03/mt_in_xrea.html</guid>
         <category></category>
         <pubDate>Tue, 21 Mar 2006 14:24:39 +0900</pubDate>
      </item>
      
   </channel>
</rss>
