Sign Up!
#!/usr/bin/perl -w # Copyright 2001-2004 Six Apart Ltd. This code cannot be redistributed without # permission from www.movabletype.org. # # $Id: mt-check.cgi,v 1.35.2.1 2004/05/13 08:56:13 ezra Exp $ use strict; local $|=1; my($MT_DIR); BEGIN { if ($0 =~ m!(.*[/\\])!) { $MT_DIR = $1; } else { $MT_DIR = './'; } unshift @INC, $MT_DIR . 'lib'; unshift @INC, $MT_DIR . 'extlib'; } print "Content-Type: text/html\n\n"; print <

Movable Type System Check [mt-check.cgi]

This page provides you with information on your system\'s configuration and determines whether you have all of the components you need to run Movable Type.

HTML my $is_good = 1; my @REQ = ( [ 'HTML::Template', 2, 1, 'HTML::Template is required for all Movable Type application functionality.' ], [ 'Image::Size', 0, 1, 'Image::Size is required for file uploads (to determine the size of uploaded images in many different formats).' ], [ 'File::Spec', 0.8, 1, 'File::Spec is required for path manipulation across operating systems.' ], [ 'CGI::Cookie', 0, 1, 'CGI::Cookie is required for cookie authentication.' ], ); my @DATA = ( [ 'DB_File', 0, 0, 'DB_File is required if you want to use the Berkeley DB/DB_File backend.' ], [ 'DBD::mysql', 0, 0, 'DBI and DBD::mysql are required if you want to use the MySQL database backend.' ], [ 'DBD::Pg', 0, 0, 'DBI and DBD::Pg are required if you want to use the PostgreSQL database backend.' ], [ 'DBD::SQLite', 0, 0, 'DBI and DBD::SQLite are required if you want to use the SQLite database backend.' ], ); my @OPT = ( [ 'HTML::Entities', 0, 0, 'HTML::Entities is needed to encode some characters, but this feature can be turned off using the NoHTMLEntities optioon in mt.cfg.' ], [ 'LWP::UserAgent', 0, 0, 'LWP::UserAgent is optional; It is needed if you wish to use the TrackBack system, the weblogs.com ping, or the MT Recently Updated ping.' ], [ 'SOAP::Lite', 0.50, 0, 'SOAP::Lite is optional; It is needed if you wish to use the MT XML-RPC server implementation.' ], [ 'File::Temp', 0, 0, 'File::Temp is optional; It is needed if you would like to be able to overwrite existing files when you upload.' ], [ 'Image::Magick', 0, 0, 'Image::Magick is optional; It is needed if you would like to be able to create thumbnails of uploaded images.' ], [ 'Storable', 0, 0, 'Storable is optional; it is required by certain MT plugins available from third parties.'], [ 'Crypt::DSA', 0, 0, 'Crypt::DSA is optional; if it is installed, comment registration sign-ins will be accelerated.'], [ 'MIME::Base64', 0, 0, 'MIME::Base64 is required in order to enable comment registration.'], [ 'XML::Atom', 0, 0, 'XML::Atom is required in order to use the Atom API.'], ); use Cwd; my $cwd = ''; { my($bad); local $SIG{__WARN__} = sub { $bad++ }; eval { $cwd = Cwd::getcwd() }; if ($bad || [email protected]) { eval { $cwd = Cwd::cwd() }; if ([email protected] && [email protected] !~ /Insecure \$ENV{PATH}/) { die [email protected]; } } } my $ver = $^V ? join('.', unpack 'C*', $^V) : $]; print <

System Information:

\n"; exit if $ENV{QUERY_STRING} && $ENV{QUERY_STRING} eq 'sys-check'; use Text::Wrap; $Text::Wrap::columns = 72; for my $list (\@REQ, \@DATA, \@OPT) { my $data = ($list == \@DATA); my $req = ($list == \@REQ); printf "

Checking for %s Modules:

\n\t
\n", $req ? "Required" : $data ? "Data Storage" : "Optional"; if (!$req && !$data) { print <

The following modules are optional; If your server does not have these modules installed, you only need to install them if you require the functionality that the module provides.

MSG } if ($data) { print <

The following modules are used by the different data storage options in Movable Type. In order run the system, your server needs to have at least one of these modules installed.

MSG } my $got_one_data = 0; for my $ref (@$list) { my($mod, $ver, $req, $desc) = @$ref; print "

$mod" . ($ver ? " (version >= $ver)" : "") . "

"; eval("use $mod" . ($ver ? " $ver;" : ";")); if ([email protected]) { $is_good = 0 if $req; my $msg = $ver ? "

Either your server does not have $mod installed, " . "the version that is installed is too old, or $mod " . "requires another module that is not installed. ": "

Your server does not have $mod " . "installed, or $mod requires another module that " . "is not installed. "; $msg .= $desc . " Please consult the installation instructions for " . "help in installing $mod.

\n\n"; print wrap(" ", " ", $msg), "\n\n"; } else { print "

Your server has $mod installed (version @{[ $mod->VERSION ]}).

\n\n"; $got_one_data = 1 if $data; } } $is_good &= $got_one_data if $data; print "\n\t
\n\n"; } if ($is_good) { print <

Movable Type System Check Successful

You're ready to go! Your server has all of the required modules installed; you do not need to perform any additional module installations. Continue with the installation instructions.

HTML } print "\n\n\n";