added new config option for php fpm fixes #1089
This commit is contained in:
@@ -77,6 +77,15 @@ return array(
|
||||
'default' => '/etc/php-fpm.d/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_aliasconfigdir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['aliasconfigdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'aliasconfigdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/php-fpm/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_tmpdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
|
||||
@@ -1821,3 +1821,17 @@ if(isFroxlorVersion('0.9.27-rc1'))
|
||||
updateToVersion('0.9.27');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.27')) {
|
||||
showUpdateStep("Updating from 0.9.27 to 0.9.28-fpmfix");
|
||||
lastStepStatus(0);
|
||||
|
||||
// Get AliasconfigDir setting if available
|
||||
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'aliasconfigdir';");
|
||||
|
||||
// If AliasconfigDir is set then skip
|
||||
if ($db->num_rows($handle) < 1) {
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/');");
|
||||
}
|
||||
|
||||
updateToVersion('0.9.28-fpmfix');
|
||||
}
|
||||
|
||||
@@ -243,12 +243,11 @@ class phpinterface_fpm
|
||||
public function getAliasConfigDir($createifnotexists = true)
|
||||
{
|
||||
// ensure default...
|
||||
if (!isset($this->_settings['system']['phpfpm_aliasconfigdir'])) {
|
||||
$this->_settings['system']['phpfpm_aliasconfigdir'] = '/var/www/php-fpm';
|
||||
if (!isset($this->_settings['phpfpm']['aliasconfigdir'])) {
|
||||
$this->_settings['phpfpm']['aliasconfigdir'] = '/var/www/php-fpm';
|
||||
}
|
||||
|
||||
$configdir = makeCorrectDir($this->_settings['system']['phpfpm_aliasconfigdir'] . '/' . $this->_domain['loginname'] . '/' . $this->_domain['domain'] . '/');
|
||||
|
||||
$configdir = makeCorrectDir($this->_settings['phpfpm']['aliasconfigdir'] . '/' . $this->_domain['loginname'] . '/' . $this->_domain['domain'] . '/');
|
||||
if(!is_dir($configdir) && $createifnotexists)
|
||||
{
|
||||
safe_exec('mkdir -p ' . escapeshellarg($configdir));
|
||||
|
||||
@@ -189,7 +189,6 @@ function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_
|
||||
|| ($only_enabledisable && isset($fielddetails['overview_option']))
|
||||
) {
|
||||
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
|
||||
|
||||
if($newfieldvalue != $fielddetails['value'])
|
||||
{
|
||||
if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true)
|
||||
|
||||
@@ -21,6 +21,7 @@ function storeSettingField($fieldname, $fielddata, $newfieldvalue)
|
||||
{
|
||||
if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '')
|
||||
{
|
||||
|
||||
if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -1527,6 +1527,7 @@ $lng['error']['intvaluetoohigh'] = 'The given number is too high (field %s)';
|
||||
$lng['admin']['phpfpm_settings'] = 'PHP-FPM';
|
||||
$lng['serversettings']['phpfpm'] = 'Enable php-fpm';
|
||||
$lng['serversettings']['phpfpm_settings']['configdir'] = 'Configuration directory of php-fpm';
|
||||
$lng['serversettings']['phpfpm_settings']['aliasconfigdir'] = 'Configuration Alias-directory of php-fpm';
|
||||
$lng['serversettings']['phpfpm_settings']['reload'] = 'php-fpm restart command';
|
||||
$lng['serversettings']['phpfpm_settings']['pm'] = 'Process manager control (pm)';
|
||||
$lng['serversettings']['phpfpm_settings']['max_children']['title'] = 'The number of child processes';
|
||||
|
||||
Reference in New Issue
Block a user