From: Brion Vibber Date: Wed, 7 Jan 2009 01:42:50 +0000 (+0000) Subject: Revert r45361 for now "(bug 16084) Default memory limit should be increased" X-Git-Tag: 1.31.0-rc.0~43537 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=52f2d0176c980db1a4e835462385c1ab6a38b872;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/config/index.php b/config/index.php index 4159c69ab7..2810561f3a 100644 --- a/config/index.php +++ b/config/index.php @@ -461,8 +461,8 @@ if( empty( $memlimit ) || $memlimit == -1 ) { $n = intval( $m[1] * (1024*1024) ); } if( $n < 20*1024*1024 ) { - print "Attempting to raise limit to 50M... "; - if( false === ini_set( "memory_limit", "50M" ) ) { + print "Attempting to raise limit to 20M... "; + if( false === ini_set( "memory_limit", "20M" ) ) { print "failed.
" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!"; } else { $conf->raiseMemory = true; @@ -1661,7 +1661,7 @@ set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_inclu require_once( \"\$IP/includes/DefaultSettings.php\" ); # If PHP's memory limit is very low, some operations may fail. -" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '50M' );" . " +" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . " if ( \$wgCommandLineMode ) { if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {