r17539 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17538‎ | r17539 | r17540 >
Date:18:01, 11 November 2006
Author:brion
Status:old
Tags:
Comment:
Backport new checks from HEAD to cut down on support requests for this common problem...

* 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:
  • /branches/REL1_8/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_8/phase3/install-utils.inc (modified) (history)
  • /branches/REL1_8/phase3/maintenance/update.php (modified) (history)

Diff [purge]

Index: branches/REL1_8/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: branches/REL1_8/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: branches/REL1_8/phase3/RELEASE-NOTES
@@ -9,6 +9,11 @@
1010
1111 MediaWiki 1.8.3 fixes several issues in the Fall 2006 snapshot release:
1212 * (bug 7831) Regression in AutoAuthenticate hook
 13+* Run PHP install version checks on update.php so command-line updaters see
 14+ new version requirements
 15+* Do a check for the PHP 5.0.x 64-bit bug, since this is much more disruptive
 16+ as of MW 1.8 than it used to be. Install or upgrade now aborts with a
 17+ warning and a request to upgrade.
1318
1419
1520 == MediaWiki 1.8.2 ==
@@ -374,6 +379,10 @@
375380
376381 MediaWiki 1.8 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.
377382
 383+PHP 5.0.x fails on 64-bit systems due to serious bugs with array processing:
 384+http://bugs.php.net/bug.php?id=34879
 385+Upgrade affected systems to PHP 5.1 or higher.
 386+
378387 MySQL 3.23.x is no longer supported; some older hosts may need to upgrade.
379388 At this time we still recommend 4.0, but 4.1/5.0 will work fine in most cases.
380389