r17538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17537‎ | r17538 | r17539 >
Date:16:59, 11 November 2006
Author:brion
Status:old
Tags:
Comment:
* 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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/install-utils.inc (modified) (history)
  • /trunk/phase3/maintenance/update.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/update.php
@@ -18,6 +18,8 @@
1919
2020 echo( "MediaWiki {$wgVersion} Updater\n\n" );
2121
 22+install_version_checks();
 23+
2224 # Do a pre-emptive check to ensure we've got credentials supplied
2325 # We can't, at this stage, check them, but we can detect their absence,
2426 # which seems to cause most of the problems people whinge about
Index: trunk/phase3/install-utils.inc
@@ -14,6 +14,16 @@
1515 echo "PHP 5.0.0 or higher is required. ABORTING.\n";
1616 die( -1 );
1717 }
 18+
 19+ // Test for PHP bug which breaks PHP 5.0.x on 64-bit...
 20+ // As of 1.8 this breaks lots of common operations instead
 21+ // of just some rare ones like export.
 22+ $borked = str_replace( 'a', 'b', array( -1 => -1 ) );
 23+ if( !isset( $borked[-1] ) ) {
 24+ echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" .
 25+ "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n";
 26+ die( -1 );
 27+ }
1828
1929 global $wgCommandLineMode;
2030 $wgCommandLineMode = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -171,7 +171,13 @@
172172 $wgParserTestFiles. This can now be appended to by extensions or local
173173 configuration files so that extension or custom tests can be automatically
174174 run along with the main batch.
 175+* Run PHP install version checks on update.php so command-line updaters see
 176+ new version requirements
 177+* Do a check for the PHP 5.0.x 64-bit bug, since this is much more disruptive
 178+ as of MW 1.8 than it used to be. Install or upgrade now aborts with a
 179+ warning and a request to upgrade.
175180
 181+
176182 == Languages updated ==
177183
178184 * Bishnupriya Manipuri (bpy)
@@ -193,6 +199,10 @@
194200
195201 MediaWiki 1.9 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.
196202
 203+PHP 5.0.x fails on 64-bit systems due to serious bugs with array processing:
 204+http://bugs.php.net/bug.php?id=34879
 205+Upgrade affected systems to PHP 5.1 or higher.
 206+
197207 MySQL 3.23.x is no longer supported; some older hosts may need to upgrade.
198208 At this time we still recommend 4.0, but 4.1/5.0 will work fine in most cases.
199209