r45361 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45360‎ | r45361 | r45362 >
Date:06:00, 3 January 2009
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
(bug 16084) Default memory limit should be increased
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 20M... ";
466 - if( false === ini_set( "memory_limit", "20M" ) ) {
 465+ print "Attempting to raise limit to 50M... ";
 466+ if( false === ini_set( "memory_limit", "50M" ) ) {
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', '20M' );" . "
 1665+" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '50M' );" . "
16661666
16671667 if ( \$wgCommandLineMode ) {
16681668 if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r45475Revert r45361 for now "(bug 16084) Default memory limit should be increased"...brion01:42, 7 January 2009
r54339(bug 16084) Default memory limit should be increaseddemon02:47, 4 August 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   01:43, 7 January 2009

Long term it needs to be done at runtime...

Reverting for now in r45475

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.

Status & tagging log