Feature #13377 » 0001-Add-a-setting-for-PHP-memory-limit-in-System-Advance.patch
| src/etc/inc/config.inc | ||
|---|---|---|
|
}
|
||
|
date_default_timezone_set("$timezone");
|
||
|
/* override php memory limit */
|
||
|
if (isset($config['system']['php_memory_limit']) && !empty($config['system']['php_memory_limit'])) {
|
||
|
ini_set("memory_limit", $config['system']['php_memory_limit'] . "M");
|
||
|
}
|
||
|
if ($config_parsed == true) {
|
||
|
/* process packager manager custom rules */
|
||
|
if (is_dir("/usr/local/pkg/parse_config")) {
|
||
| src/usr/local/pfSense/include/www/system_advanced_misc.inc | ||
|---|---|---|
|
$pconfig['do_not_send_uniqueid'] = isset($config['system']['do_not_send_uniqueid']);
|
||
|
$pconfig['pti'] = get_single_sysctl('vm.pmap.pti');
|
||
|
$pconfig['mds']= get_single_sysctl('hw.mds_disable_state');
|
||
|
$pconfig['php_memory_limit'] = $config['system']['php_memory_limit'];
|
||
|
$pconfig['powerd_ac_mode'] = "hadp";
|
||
|
if (!empty($config['system']['powerd_ac_mode'])) {
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
// PHP Memory Limit
|
||
|
if (isset($post['php_memory_limit']) && !empty($post['php_memory_limit'])) {
|
||
|
$config['system']['php_memory_limit'] = $post['php_memory_limit'];
|
||
|
} else {
|
||
|
unset($config['system']['php_memory_limit']);
|
||
|
}
|
||
|
// Add/Remove RAM disk periodic backup cron jobs according to settings and installation type.
|
||
|
// Remove the cron jobs on full install if not using RAM disk.
|
||
|
// Add the cron jobs on all others if the periodic backup option is set. Otherwise the cron job is removed.
|
||
| src/usr/local/www/system_advanced_misc.php | ||
|---|---|---|
|
'Enabling this checkbox overrides that behavior.');
|
||
|
$form->add($section);
|
||
|
$section = new Form_Section('PHP Settings');
|
||
|
$group = new Form_Group('Memory Limit');
|
||
|
$group->add(new Form_Input(
|
||
|
'php_memory_limit',
|
||
|
'Memory Limit',
|
||
|
'number',
|
||
|
str_replace("M", "", $pconfig['php_memory_limit']),
|
||
|
['placeholder' => str_replace("M", "", ini_get('memory_limit'))]
|
||
|
))->setHelp('PHP memory limit in MiB.');
|
||
|
$section->add($group);
|
||
|
$form->add($section);
|
||
|
$section = new Form_Section('RAM Disk Settings (Reboot to Apply Changes)');
|
||
|
$section->addInput(new Form_Checkbox(
|
||