Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1575

memory limit always 24MB in civicrm.settings.php

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      JUST NOTICED THIS AND HAVEN'T TESTED IT, BUT IN CIVICRM.SETTINGS.PHP:

      // make sure the memory_limit is at least 24 MiB
      $memLimitString = trim(ini_get('memory_limit'));
      $memLimitUnit = strtolower(substr($memLimitString, -1));
      $memLimit = (int) $memLimitString;
      switch ($memLimitUnit) {
      case 'g': $memLimit *= 1024; // ONLY ONE IF ANY OF THESE THREE CASES WILL EVER BE SELECTED *=1024 IS ONLY OPTION!
      case 'm': $memLimit *= 1024; // ALSO IS case CASE-INSENSITIVE??
      case 'k': $memLimit *= 1024; // ini_get RETURNS THE STRING AS DEFINED IN php.ini WHICH MIGHT BE UPPERCASE G,M,K
      }
      if ($memLimit >= 0 and $memLimit < 25165824) {
      ini_set('memory_limit', '24M'); //SO SEEMS PRETTY LIKELY MEM LIMIT IS ALWAYS SET TO 24M!
      }

        Attachments

          Activity

            People

            • Assignee:
              shot Piotr Szotkowski
              Reporter:
              hirstp Peter Hirst
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: