diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2006-11-11 16:59:32 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2006-11-11 16:59:32 +0000 |
commit | 6c3c1786e9c3099364415caee59945c555f89333 (patch) | |
tree | b0e26d351bab2b0fdc885f4c7db3967fd34180ce /install-utils.inc | |
parent | 8aa84c27fedc6320c7c71f647f26fcc8a4ec2fd4 (diff) | |
download | mediawikicore-6c3c1786e9c3099364415caee59945c555f89333.tar.gz mediawikicore-6c3c1786e9c3099364415caee59945c555f89333.zip |
* Run PHP install version checks on update.php so command-line updaters see
new version requirements
* Do a check for the PHP 5.0.x 64-bit bug, since this is much more disruptive
as of MW 1.8 than it used to be. Install or upgrade now aborts with a
warning and a request to upgrade.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/17538
Diffstat (limited to 'install-utils.inc')
-rw-r--r-- | install-utils.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/install-utils.inc b/install-utils.inc index 2bc67c287bdf..fa7b80e580eb 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -14,6 +14,16 @@ function install_version_checks() { echo "PHP 5.0.0 or higher is required. ABORTING.\n"; die( -1 ); } + + // Test for PHP bug which breaks PHP 5.0.x on 64-bit... + // As of 1.8 this breaks lots of common operations instead + // of just some rare ones like export. + $borked = str_replace( 'a', 'b', array( -1 => -1 ) ); + if( !isset( $borked[-1] ) ) { + echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . + "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n"; + die( -1 ); + } global $wgCommandLineMode; $wgCommandLineMode = true; |