From 2000b2964394df45dd6f8017eb27d8a11fd2c477 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 15 Oct 2006 20:12:08 +0000 Subject: [PATCH] * Friendlier check for PHP 5 in command-line scripts; it's common for parallel PHP 4 and 5 installations to interfere on the command-line. --- RELEASE-NOTES | 2 ++ maintenance/commandLine.inc | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ca0aa6baa6..98a9ece767 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -47,6 +47,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added global $wgStyleVersion to centralize bumping CSS and JS file versions for cache-friendly style and script updating * (bug 7562) Fix non-ASCII namespaces on Windows/XAMPP servers +* Friendlier check for PHP 5 in command-line scripts; it's common for parallel + PHP 4 and 5 installations to interfere on the command-line. == Languages updated == diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 2549057e41..13e2ef5cd9 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -14,6 +14,15 @@ if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { exit(); } +if( version_compare( PHP_VERSION, '5.0.0' ) < 0 ) { + print "Sorry! This version of MediaWiki requires PHP 5; you are running " . + PHP_VERSION . ".\n\n" . + "If you are sure you already have PHP 5 installed, it may be " . + "installed\n" . + "in a different path from PHP 4. Check with your system administrator.\n"; + die( -1 ); +} + define('MEDIAWIKI',true); # Process command line arguments -- 2.20.1