diff options
author | Sergio Santoro <santoro.srg@gmail.com> | 2014-07-07 12:48:11 +0200 |
---|---|---|
committer | Sergio Santoro <santoro.srg@gmail.com> | 2014-07-08 10:19:02 +0200 |
commit | c2040515ef936ddc6e5ede0d231a8cf60e10d758 (patch) | |
tree | 3341da0990dbcc24b513a0ebd3a7d5ec02b3b497 /mw-config/index.php | |
parent | 65a2e7a335b8de6fba9b5e92874b2d588b73447e (diff) | |
download | mediawikicore-c2040515ef936ddc6e5ede0d231a8cf60e10d758.tar.gz mediawikicore-c2040515ef936ddc6e5ede0d231a8cf60e10d758.zip |
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
Diffstat (limited to 'mw-config/index.php')
-rw-r--r-- | mw-config/index.php | 7 |
1 files changed, 7 insertions, 0 deletions
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 ); |