From c2040515ef936ddc6e5ede0d231a8cf60e10d758 Mon Sep 17 00:00:00 2001 From: Sergio Santoro Date: Mon, 7 Jul 2014 12:48:11 +0200 Subject: Web installer: check for low PHP versions before executing Web installer was not checking for unsupported PHP versions. In those cases the script should terminate or the installation will break (e.g. syntax errors for PHP4). Installer::doEnvironmentChecks() no longer checks for PHP version since it has already been done by the entry scripts (both in cli and web modes) Installer::MINIMUM_PHP_VERSION has been removed since it is no longer used. Message config-env-php-toolow is no longer used and it has been removed Change-Id: I9227868bd2bd4e13bad6b95ad581be3ada71c94e --- mw-config/index.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mw-config/index.php') diff --git a/mw-config/index.php b/mw-config/index.php index 56c1308956d1..9e83c5464478 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -20,6 +20,13 @@ * @file */ +// Bail if PHP is too low +if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) { + // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ + require dirname( dirname( __FILE__ ) ) . '/includes/PHPVersionError.php'; + wfPHPVersionError( 'mw-config/index.php' ); +} + define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); define( 'MEDIAWIKI_INSTALL', true ); -- cgit v1.2.3