* (bug 1000) Clarify warning about memory_limit in installer
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Jan 2007 23:16:08 +0000 (23:16 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Jan 2007 23:16:08 +0000 (23:16 +0000)
* Suppress PHP warning about set_time_limit in installer when safe mode is on

RELEASE-NOTES
config/index.php
install-utils.inc

index 92a97dc..2ae6787 100644 (file)
@@ -74,6 +74,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 8628) Add user-aware block list link to Special:Blockip
 * (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins
 * (bug 8629) Document $wgFilterCallback
+* (bug 1000) Clarify warning about memory_limit in installer
+* Suppress PHP warning about set_time_limit in installer when safe mode is on
+
 
 == Languages updated ==
 
index 29250a4..fb189fa 100644 (file)
@@ -373,7 +373,7 @@ $conf->raiseMemory = false;
 if( empty( $memlimit ) || $memlimit == -1 ) {
        print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
 } else {
-       print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ) . ". <strong>If this is too low, installation may fail!</strong> ";
+       print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars( $memlimit ) . ". ";
        $n = intval( $memlimit );
        if( preg_match( '/^([0-9]+)[Mm]$/', trim( $memlimit ), $m ) ) {
                $n = intval( $m[1] * (1024*1024) );
@@ -381,7 +381,7 @@ if( empty( $memlimit ) || $memlimit == -1 ) {
        if( $n < 20*1024*1024 ) {
                print "Attempting to raise limit to 20M... ";
                if( false === ini_set( "memory_limit", "20M" ) ) {
-                       print "failed.";
+                       print "failed.<br /><b>" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!</b>";
                } else {
                        $conf->raiseMemory = true;
                        print "ok.";
index 84fbc8e..3ff06ec 100644 (file)
@@ -28,7 +28,7 @@ function install_version_checks() {
        global $wgCommandLineMode;
        $wgCommandLineMode = true;
        umask( 000 );
-       set_time_limit( 0 );
+       @set_time_limit( 0 );
 }
 
 function copyfile( $sdir, $name, $ddir, $perms = 0664 ) {