2

MovableType 5.2 has builtin PSGI support (via a mt.psgi in the main directory) and I've been trying to take advantage of it using starman/plackup.

Starman w/ MT fires up, but I get odd Not Founds and a silent hang & fail when I run mt-upgrade.cgi.

How I am running starman:

cd /home/ec2-user/mysite/perl/components/movabletype
plackup -s Starman --port 8045 --error-log /home/ec2-user/mysite/perl/logs/starman.log --pid /home/ec2-user/mysite/perl/var/starman.pid -a mt.psgi

Mystery 1: My browser returns "Not Found" for index.html, but mt-static and mt.cgi is reachable.

X http://mysite:8045/mt/index.html ... Not Found 
✓ http://mysite:8045/mt-static ... listing of static assets 
✓ http://mysite:8045/mt/mt.cgi ... redirects to ... 
X http://mysite:8045/mt/mt-upgrade.cgi?__mode=install ... fails

Mystery 2: Due to the redirect I believe that MT code is running. But it is mostly silent in the starman log even though I have tried different MT debug options. Worse, the mt-upgrade.cgi seems to be reached then fails with this lone message to the starman log:

[mypid] Bootstrap CGI script in non-buffering mode: /home/ec2-user/mysite/perl/components/movabletype/mt-upgrade.cgi

This non-buffering message seems informational and normal, and is coming from the MT codebase.

I have also run directly under starman and get the same result.

Any ideas or help would be appreciated!

System/Environment:

MT_HOME='/home/ec2-user/mysite/perl/components/movabletype'

linux AMI on an amazon ec2.

perl-5.16.0 under perlbrew.

CPAN modules:

cpanm starman
cpanm CGI::PSGI
cpanm CGI::Parse::PSGI
cpanm CGI::Compile
yum install expat-devel
cpanm XML::Parser
cpanm SOAP::Lite
cpanm SOAP::Transport::HTTP
cpanm XMLRPC::Transport::HTTP::Plack
cpanm DBI
sudo yum install postgresql9-devel
cpanm DBD::Pg
cpanm Task::Plack

MT config:

CGIPath    http://mysite:8045/mt

StaticWebPath    http://mysite:8045/mt-static

PIDFilePath /home/ec2-user/mysite/perl/var/starman.pid

DebugMode 1

ObjectDriver DBI::postgres
Database db
DBUser dbuser
DBPassword dbpass
DBHost dbhost.mysite
4

4 回答 4

2

我是 Movable Type 的首席工程师 Yuji Takayama。我确实尝试重现您的步骤,但我无法重现这一点。(这意味着我得到了初始安装屏幕)

那么,你可以试试mysql吗?你也可以试试“工具/升级”脚本吗?我认为当发生某些错误时您会收到错误消息。

例如)cd MT_HOME;perl -Ilib -Iextlib 工具/升级 --username --password --nickname --email --preferred_language --site_name --site_url --site_path --site_theme --site_timezone

而且,我有关于“找不到 index.html”的答案。

原因:MT永远不会像mt_static一样将MT_HOME挂载为静态文件目录,因为我们认为MT_HOME一定不可能列出来。

于 2013-01-07T05:46:25.977 回答
1

如果您尝试在 Starman 下运行 Movable Type,我强烈建议您使用您选择的命令行等效项来运行 Movable Type 附带的升级脚本。没有充分的理由让 mt-upgrade.cgi 以 Starman 和 Plack 所允许的方式持久化。

于 2013-01-06T23:28:52.570 回答
0

Try to change your paths in mt-config.cgi to relative paths, not URLs. Like so:

CGIPath /mt/
StaticWebPath /mt-static/

Just curious: although it does work now, are you aware that PG isn't supported and that you're taking a risk that a future version of MT might break with it?

P.S. also don't forget the PIDFilePath directive mentioned in the documentation.

于 2012-12-03T23:33:51.323 回答
0

顺便说一句,404http://mysite:8045/mt/index.html看起来很正常。您的站点索引不应该与 MT 处于同一级别(您可以,但这不是推荐的设置,并且它不适用于假设 MT 和生成的站点明显分开的库存 MT 安装)。

于 2012-12-04T09:36:43.203 回答