* Run PHP install version checks on update.php so command-line updaters see
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 11 Nov 2006 16:59:32 +0000 (16:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 11 Nov 2006 16:59:32 +0000 (16:59 +0000)
  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.

RELEASE-NOTES
install-utils.inc
maintenance/update.php

index decf0a0..510f825 100644 (file)
@@ -171,6 +171,12 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   $wgParserTestFiles. This can now be appended to by extensions or local
   configuration files so that extension or custom tests can be automatically
   run along with the main batch.
+* 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.
+
 
 == Languages updated ==
 
@@ -193,6 +199,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 
 MediaWiki 1.9 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.
 
+PHP 5.0.x fails on 64-bit systems due to serious bugs with array processing:
+http://bugs.php.net/bug.php?id=34879
+Upgrade affected systems to PHP 5.1 or higher.
+
 MySQL 3.23.x is no longer supported; some older hosts may need to upgrade.
 At this time we still recommend 4.0, but 4.1/5.0 will work fine in most cases.
 
index 2bc67c2..fa7b80e 100644 (file)
@@ -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;
index d2dcbf9..402818c 100644 (file)
@@ -18,6 +18,8 @@ $dbclass = 'Database' . ucfirst( $wgDBtype ) ;
 
 echo( "MediaWiki {$wgVersion} Updater\n\n" );
 
+install_version_checks();
+
 # Do a pre-emptive check to ensure we've got credentials supplied
 # We can't, at this stage, check them, but we can detect their absence,
 # which seems to cause most of the problems people whinge about