NGINX/FCGI and Movable Type 4

Andrew Andrew e. lists at ruby-forum.com
Tue Apr 21 05:01:36 MSD 2009


I've installed nginx and fcgi, and was able to run a hello world cgi
script on a new server with no problem.

I go to install MT 4.25 (which if you are unaware runs on cgi), and I
get the same 502 Bad Gateway error I get if something goes wrong.

I checked the nginx error logs and this is what I saw:

2009/04/20 15:33:03 [error] 4334#0: *1 FastCGI sent in stderr: "Can't
locate MT/Bootstrap.pm in @INC (@INC contains: lib /etc/perl
/usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at
/home/<username>/public_html/<sitename>/public/cgi-bin/mt/mt.cgi line
11.
BEGIN failed--compilation aborted at
/home/<username>/public_html/<sitename>/public/cgi-bin/mt/mt.cgi line
11.
Bad file descriptor at /usr/local/bin/cgiwrap-fcgi.pl line 106" while
reading response header from upstream, client: 67.127.103.73, server:
<servername>, request: "GET /cgi-bin/mt/mt.cgi HTTP/1.1", upstream:
"fastcgi://unix:/var/run/nginx/perl_cgi-dispatch.sock:", host:
"<hostname>"
2009/04/20 15:33:03 [error] 4334#0: *1 upstream closed prematurely
FastCGI stdout while reading response header from upstream, client:
67.127.103.73, server: <servername>, request: "GET /cgi-bin/mt/mt.cgi
HTTP/1.1", upstream:
"fastcgi://unix:/var/run/nginx/perl_cgi-dispatch.sock:", host:
"<hostname>"

Just for reference, here are the appropriate error line that get thrown:

mt.cgi - line 8-11
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap App => 'MT::App::CMS';

cgiwrap-fcgi.pl line 104-107
while ( $bytes = read( PARENT_ERR, $errbytes, 4096 ) )
{
  print STDERR $errbytes;
}

Any ideas what could cause the errors? Originally, I thought it had to
do with some resource pointers in another mt file (mt-config.cgi) but
I've ruled that out.

Any insight would be appreciated.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list