]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9363 update memory limit checks and docs; merged from MOODLE_18_STABLE
authorskodak <skodak>
Sun, 15 Apr 2007 14:30:47 +0000 (14:30 +0000)
committerskodak <skodak>
Sun, 15 Apr 2007 14:30:47 +0000 (14:30 +0000)
install.php
lang/en_utf8/install.php

index 7c1695f1a7d45766475bf940f2c1363e19546dc1..adeedec3d35a0cefeff8d27398426f3d9f0e1626 100644 (file)
@@ -1020,14 +1020,14 @@ function get_memory_limit() {
 
 function check_memory_limit() {
 
-    /// if limit is already 16M or more then we don't care if we can change it or not
-    if ((int)str_replace('M', '', get_memory_limit()) >= 16) {
+    /// if limit is already 40 or more then we don't care if we can change it or not
+    if ((int)str_replace('M', '', get_memory_limit()) >= 40) {
         return true;
     }
-
+return false;
     /// Otherwise, see if we can change it ourselves
-    @ini_set('memory_limit', '16M');
-    return ((int)str_replace('M', '', get_memory_limit()) >= 16);
+    @ini_set('memory_limit', '40M');
+    return ((int)str_replace('M', '', get_memory_limit()) >= 40);
 }
 
 //==========================================================================//
index 3627cdcea32cd59a9881bd5603fbbe3aa42efa2f..76ce9f5c80188847ab76f6f6fb679f18b4e88cf4 100644 (file)
@@ -214,17 +214,17 @@ $string['memorylimithelp'] = '<p>The PHP memory limit for your server is current
 <p>This may cause Moodle to have memory problems later on, especially 
    if you have a lot of modules enabled and/or a lot of users.</p>
 
-<p>We recommend that you configure PHP with a higher limit if possible, like 16M.  
+<p>We recommend that you configure PHP with a higher limit if possible, like 40M.  
    There are several ways of doing this that you can try:</p>
 <ol>
 <li>If you are able to, recompile PHP with <i>--enable-memory-limit</i>.  
     This will allow Moodle to set the memory limit itself.</li>
 <li>If you have access to your php.ini file, you can change the <b>memory_limit</b> 
-    setting in there to something like 16M.  If you don\'t have access you might 
+    setting in there to something like 40M.  If you don\'t have access you might 
     be able to ask your administrator to do this for you.</li>
 <li>On some PHP servers you can create a .htaccess file in the Moodle directory 
     containing this line:
-    <p><blockquote>php_value memory_limit 16M</blockquote></p>
+    <p><blockquote>php_value memory_limit 40M</blockquote></p>
     <p>However, on some servers this will prevent <b>all</b> PHP pages from working 
     (you will see errors when you look at pages) so you\'ll have to remove the .htaccess file.</p></li>
 </ol>';