r45475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45474‎ | r45475 | r45476 >
Date:01:42, 7 January 2009
Author:brion
Status:ok
Tags:
Comment:
Revert r45361 for now "(bug 16084) Default memory limit should be increased"
The logic is wrong and will fail to raise the limit to the new limit if the server's default is between 20 and 50.
Further, the whole logic is crappy; we should be doing the check at runtime rather than at install time, since the server's settings may change after we install.
Modified paths:
  • /trunk/phase3/config/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/config/index.php
@@ -461,8 +461,8 @@
462462 $n = intval( $m[1] * (1024*1024) );
463463 }
464464 if( $n < 20*1024*1024 ) {
465 - print "Attempting to raise limit to 50M... ";
466 - if( false === ini_set( "memory_limit", "50M" ) ) {
 465+ print "Attempting to raise limit to 20M... ";
 466+ if( false === ini_set( "memory_limit", "20M" ) ) {
467467 print "failed.<br /><b>" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!</b>";
468468 } else {
469469 $conf->raiseMemory = true;
@@ -1661,7 +1661,7 @@
16621662 require_once( \"\$IP/includes/DefaultSettings.php\" );
16631663
16641664 # If PHP's memory limit is very low, some operations may fail.
1665 -" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '50M' );" . "
 1665+" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
16661666
16671667 if ( \$wgCommandLineMode ) {
16681668 if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r54339(bug 16084) Default memory limit should be increaseddemon02:47, 4 August 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45361(bug 16084) Default memory limit should be increasedaaron06:00, 3 January 2009

Status & tagging log