| | 78 | // Check and increase php memory_limit if needed and if allowed on the system |
|---|
| | 79 | // |
|---|
| | 80 | $current_memory_limit = rtrim(ini_get('memory_limit'),'M'); |
|---|
| | 81 | $proper_memory_limit = '100'; |
|---|
| | 82 | if ($current_memory_limit < $proper_memory_limit) { |
|---|
| | 83 | if (ini_set('memory_limit',$proper_memory_limit.'M') !== false) { |
|---|
| | 84 | $nt->add_notice('core', 'MEMLIMIT', _("Memory Limit Changed"), sprintf(_("Your memory_limit, %sM, is set too low and has been increased to %sM. You may want to change this in you php.ini config file"),$current_memory_limit,$proper_memory_limit)); |
|---|
| | 85 | } else { |
|---|
| | 86 | $nt->add_warning('core', 'MEMERR', _("Low Memory Limit"), sprintf(_("Your memory_limit, %sM, is set too low and may cause problems. FreePBX is not able to change this on your system. You should increase this to %sM in you php.ini config file"),$current_memory_limit,$proper_memory_limit)); |
|---|
| | 87 | } |
|---|
| | 88 | } else { |
|---|
| | 89 | $nt->delete('core', 'MEMLIMIT'); |
|---|
| | 90 | } |
|---|
| | 91 | |
|---|