From: Brion Vibber Date: Sun, 15 Oct 2006 20:12:08 +0000 (+0000) Subject: * Friendlier check for PHP 5 in command-line scripts; it's common for parallel X-Git-Tag: 1.31.0-rc.0~55482 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=2000b2964394df45dd6f8017eb27d8a11fd2c477;p=lhc%2Fweb%2Fwiklou.git * 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. --- 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