Skip to content
Snippets Groups Projects
Commit 2e1eb726 authored by lobo's avatar lobo
Browse files

Merge pull request #702 from eileenmcnaughton/CRM-12584

CRM-12584 GenCode shouldn't reduce memory_limit
parents d43d3a54 0d035206
Branches
Tags
No related merge requests found
<?php
ini_set('include_path', '.' . PATH_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . '..');
ini_set('memory_limit', '512M');
// make sure the memory_limit is at least 512 MB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit = strtolower(substr($memLimitString, -1));
$memLimit = (int) $memLimitString;
switch ($memLimitUnit) {
case 'g': $memLimit *= 1024;
case 'm': $memLimit *= 1024;
case 'k': $memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 536870912) {
ini_set('memory_limit', '512M');
}
date_default_timezone_set('UTC'); // avoid php warnings if timezone is not set - CRM-10844
define('CIVICRM_UF', 'Drupal');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment