Merge remote-tracking branch 'origin/master' into 0.10.0

This commit is contained in:
Michael Kaufmann
2018-09-30 10:04:15 +02:00
12 changed files with 315 additions and 29 deletions

View File

@@ -80,19 +80,6 @@ return array(
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') 'visible' => Settings::Get('system.use_ssl')
), ),
'system_http2_support' => array(
'label' => $lng['serversettings']['http2_support'],
'settinggroup' => 'system',
'varname' => 'http2_support',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2',
'nginx'
),
'visible' => Settings::Get('system.use_ssl')
),
/** /**
* FCGID * FCGID
*/ */

View File

@@ -60,6 +60,19 @@ return array(
'apache2' 'apache2'
) )
), ),
'system_http2_support' => array(
'label' => $lng['serversettings']['http2_support'],
'settinggroup' => 'system',
'varname' => 'http2_support',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2',
'nginx'
),
'visible' => Settings::Get('system.use_ssl')
),
'system_httpuser' => array( 'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'], 'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system', 'settinggroup' => 'system',

View File

@@ -80,6 +80,10 @@ if ($page == 'overview') {
$fpmconfigs .= makeoption($row['description'], $row['id'], 1, true, true); $fpmconfigs .= makeoption($row['description'], $row['id'], 1, true, true);
} }
$pm_select = makeoption('static', 'static', 'static', true, true);
$pm_select.= makeoption('dynamic', 'dynamic', 'static', true, true);
$pm_select.= makeoption('ondemand', 'ondemand', 'static', true, true);
$phpconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php'; $phpconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data); $phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
@@ -156,6 +160,10 @@ if ($page == 'overview') {
$fpmconfigs .= makeoption($row['description'], $row['id'], $result['fpmsettingid'], true, true); $fpmconfigs .= makeoption($row['description'], $row['id'], $result['fpmsettingid'], true, true);
} }
$pm_select = makeoption('static', 'static', $result['pm'], true, true);
$pm_select.= makeoption('dynamic', 'dynamic', $result['pm'], true, true);
$pm_select.= makeoption('ondemand', 'ondemand', $result['pm'], true, true);
$phpconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php'; $phpconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data); $phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);

View File

@@ -406,21 +406,12 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('login', 'maxloginattempts', '3'), ('login', 'maxloginattempts', '3'),
('login', 'deactivatetime', '900'), ('login', 'deactivatetime', '900'),
('phpfpm', 'enabled', '0'), ('phpfpm', 'enabled', '0'),
('phpfpm', 'configdir', '/etc/php-fpm.d/'),
('phpfpm', 'reload', '/etc/init.d/php-fpm restart'),
('phpfpm', 'pm', 'static'),
('phpfpm', 'max_children', '1'),
('phpfpm', 'start_servers', '20'),
('phpfpm', 'min_spare_servers', '5'),
('phpfpm', 'max_spare_servers', '35'),
('phpfpm', 'max_requests', '0'),
('phpfpm', 'tmpdir', '/var/customers/tmp/'), ('phpfpm', 'tmpdir', '/var/customers/tmp/'),
('phpfpm', 'peardir', '/usr/share/php/:/usr/share/php5/'), ('phpfpm', 'peardir', '/usr/share/php/:/usr/share/php5/'),
('phpfpm', 'envpath', '/usr/local/bin:/usr/bin:/bin'), ('phpfpm', 'envpath', '/usr/local/bin:/usr/bin:/bin'),
('phpfpm', 'enabled_ownvhost', '0'), ('phpfpm', 'enabled_ownvhost', '0'),
('phpfpm', 'vhost_httpuser', 'froxlorlocal'), ('phpfpm', 'vhost_httpuser', 'froxlorlocal'),
('phpfpm', 'vhost_httpgroup', 'froxlorlocal'), ('phpfpm', 'vhost_httpgroup', 'froxlorlocal'),
('phpfpm', 'idle_timeout', '30'),
('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/'), ('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/'),
('phpfpm', 'defaultini', '1'), ('phpfpm', 'defaultini', '1'),
('phpfpm', 'vhost_defaultini', '2'), ('phpfpm', 'vhost_defaultini', '2'),
@@ -696,7 +687,7 @@ opcache.interned_strings_buffer'),
('panel', 'password_special_char', '!?<>§$%+#=@'), ('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'customer_hide_options', ''), ('panel', 'customer_hide_options', ''),
('panel', 'version', '0.10.0'), ('panel', 'version', '0.10.0'),
('panel', 'db_version', '201809180'); ('panel', 'db_version', '201809280');
DROP TABLE IF EXISTS `panel_tasks`; DROP TABLE IF EXISTS `panel_tasks`;
@@ -904,6 +895,15 @@ CREATE TABLE `panel_phpconfigs` (
`phpsettings` text NOT NULL, `phpsettings` text NOT NULL,
`fpmsettingid` int(11) NOT NULL DEFAULT '1', `fpmsettingid` int(11) NOT NULL DEFAULT '1',
`pass_authorizationheader` tinyint(1) NOT NULL default '0', `pass_authorizationheader` tinyint(1) NOT NULL default '0',
`override_fpmconfig` tinyint(1) NOT NULL DEFAULT '0',
`pm` varchar(15) NOT NULL DEFAULT 'static',
`max_children` int(4) NOT NULL DEFAULT '1',
`start_servers` int(4) NOT NULL DEFAULT '20',
`min_spare_servers` int(4) NOT NULL DEFAULT '5',
`max_spare_servers` int(4) NOT NULL DEFAULT '35',
`max_requests` int(4) NOT NULL DEFAULT '0',
`idle_timeout` int(4) NOT NULL DEFAULT '30',
`limit_extensions` varchar(255) NOT NULL default '.php',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `fpmsettingid` (`fpmsettingid`) KEY `fpmsettingid` (`fpmsettingid`)
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci; ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;

View File

@@ -4011,3 +4011,52 @@ if (isDatabaseVersion('201805290')) {
updateToDbVersion('201809180'); updateToDbVersion('201809180');
} }
if (isDatabaseVersion('201809180')) {
showUpdateStep("Adding new fields for php configs");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `override_fpmconfig` tinyint(1) NOT NULL DEFAULT '0';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `pm` varchar(15) NOT NULL DEFAULT 'static';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `max_children` int(4) NOT NULL DEFAULT '1';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `start_servers` int(4) NOT NULL DEFAULT '20';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `min_spare_servers` int(4) NOT NULL DEFAULT '5';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `max_spare_servers` int(4) NOT NULL DEFAULT '35';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `max_requests` int(4) NOT NULL DEFAULT '0';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `idle_timeout` int(4) NOT NULL DEFAULT '30';");
Database::query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `limit_extensions` varchar(255) NOT NULL default '.php';");
lastStepStatus(0);
showUpdateStep("Synchronize fpm-daemon process manager settings with php-configs");
// get all fpm-daemons
$sel_stmt = Database::prepare("SELECT * FROM `panel_fpmdaemons`;");
Database::pexecute($sel_stmt);
$fpm_daemons = $sel_stmt->fetchAll(PDO::FETCH_ASSOC);
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET
`pm` = :pm,
`max_children` = :maxc,
`start_servers` = :starts,
`min_spare_servers` = :minss,
`max_spare_servers` = :maxss,
`max_requests` = :maxr,
`idle_timeout` = :it,
`limit_extensions` = :le
WHERE `fpmsettingid` = :fpmid
");
// update all php-configs with the pm data from the fpm-daemon
foreach ($fpm_daemons as $fpm_daemon) {
Database::pexecute($upd_stmt, array(
'pm' => $fpm_daemon['pm'],
'maxc' => $fpm_daemon['max_children'],
'starts' => $fpm_daemon['start_servers'],
'minss' => $fpm_daemon['min_spare_servers'],
'maxss' => $fpm_daemon['max_spare_servers'],
'maxr' => $fpm_daemon['max_requests'],
'it' => $fpm_daemon['idle_timeout'],
'le' => $fpm_daemon['limit_extensions'],
'fpmid' => $fpm_daemon['id']
));
}
lastStepStatus(0);
updateToDbVersion('201809280');
}

View File

@@ -146,6 +146,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
if (Settings::Get('system.mod_fcgid') == 1) { if (Settings::Get('system.mod_fcgid') == 1) {
$binary = $this->getParam('binary'); $binary = $this->getParam('binary');
$fpm_config_id = 1;
} elseif (Settings::Get('phpfpm.enabled') == 1) { } elseif (Settings::Get('phpfpm.enabled') == 1) {
$fpm_config_id = intval($this->getParam('fpmconfig')); $fpm_config_id = intval($this->getParam('fpmconfig'));
} }
@@ -160,6 +161,19 @@ class PhpSettings extends ApiCommand implements ResourceEntity
$fpm_reqslowtimeout = $this->getParam('phpfpm_reqslowtimeout', true, "5s"); $fpm_reqslowtimeout = $this->getParam('phpfpm_reqslowtimeout', true, "5s");
$fpm_pass_authorizationheader = $this->getParam('phpfpm_pass_authorizationheader', true, 0); $fpm_pass_authorizationheader = $this->getParam('phpfpm_pass_authorizationheader', true, 0);
$override_fpmconfig = $this->getParam('override_fpmconfig', true, 0);
$def_fpmconfig = $this->apiCall('FpmDaemons.get', array(
'id' => $fpm_config_id
));
$pmanager = $this->getParam('pm', true, $def_fpmconfig['pm']);
$max_children = $this->getParam('max_children', true, $def_fpmconfig['max_children']);
$start_servers = $this->getParam('start_servers', true, $def_fpmconfig['start_servers']);
$min_spare_servers = $this->getParam('min_spare_servers', true, $def_fpmconfig['min_spare_servers']);
$max_spare_servers = $this->getParam('max_spare_servers', true, $def_fpmconfig['max_spare_servers']);
$max_requests = $this->getParam('max_requests', true, $def_fpmconfig['max_requests']);
$idle_timeout = $this->getParam('idle_timeout', true, $def_fpmconfig['idle_timeout']);
$limit_extensions = $this->getParam('limit_extensions', true, $def_fpmconfig['limit_extensions']);
// validation // validation
$description = validate($description, 'description', '', '', array(), true); $description = validate($description, 'description', '', '', array(), true);
$phpsettings = validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true); $phpsettings = validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true);
@@ -181,9 +195,22 @@ class PhpSettings extends ApiCommand implements ResourceEntity
$fpm_reqtermtimeout = 0; $fpm_reqtermtimeout = 0;
$fpm_reqslowtimeout = 0; $fpm_reqslowtimeout = 0;
$fpm_pass_authorizationheader = 0; $fpm_pass_authorizationheader = 0;
$override_fpmconfig = 0;
} elseif (Settings::Get('phpfpm.enabled') == 1) { } elseif (Settings::Get('phpfpm.enabled') == 1) {
$fpm_reqtermtimeout = validate($fpm_reqtermtimeout, 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true); $fpm_reqtermtimeout = validate($fpm_reqtermtimeout, 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true);
$fpm_reqslowtimeout = validate($fpm_reqslowtimeout, 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true); $fpm_reqslowtimeout = validate($fpm_reqslowtimeout, 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true);
if (! in_array($pmanager, array(
'static',
'dynamic',
'ondemand'
))) {
throw new ErrorException("Unknown process manager", 406);
}
if (empty($limit_extensions)) {
$limit_extensions = '.php';
}
$limit_extensions = validate($limit_extensions, 'limit_extensions', '/^(\.[a-z]([a-z0-9]+)\ ?)+$/', '', array(), true);
// disable fcgid stuff // disable fcgid stuff
$binary = '/usr/bin/php-cgi'; $binary = '/usr/bin/php-cgi';
$file_extensions = 'php'; $file_extensions = 'php';
@@ -209,7 +236,16 @@ class PhpSettings extends ApiCommand implements ResourceEntity
`fpm_reqslow` = :fpmreqslow, `fpm_reqslow` = :fpmreqslow,
`phpsettings` = :phpsettings, `phpsettings` = :phpsettings,
`fpmsettingid` = :fpmsettingid, `fpmsettingid` = :fpmsettingid,
`pass_authorizationheader` = :fpmpassauth `pass_authorizationheader` = :fpmpassauth,
`override_fpmconfig` = :ofc,
`pm` = :pm,
`max_children` = :max_children,
`start_servers` = :start_servers,
`min_spare_servers` = :min_spare_servers,
`max_spare_servers` = :max_spare_servers,
`max_requests` = :max_requests,
`idle_timeout` = :idle_timeout,
`limit_extensions` = :limit_extensions
"); ");
$ins_data = array( $ins_data = array(
'desc' => $description, 'desc' => $description,
@@ -223,7 +259,16 @@ class PhpSettings extends ApiCommand implements ResourceEntity
'fpmreqslow' => $fpm_reqslowtimeout, 'fpmreqslow' => $fpm_reqslowtimeout,
'phpsettings' => $phpsettings, 'phpsettings' => $phpsettings,
'fpmsettingid' => $fpm_config_id, 'fpmsettingid' => $fpm_config_id,
'fpmpassauth' => $fpm_pass_authorizationheader 'fpmpassauth' => $fpm_pass_authorizationheader,
'ofc' => $override_fpmconfig,
'pm' => $pmanager,
'max_children' => $max_children,
'start_servers' => $start_servers,
'min_spare_servers' => $min_spare_servers,
'max_spare_servers' => $max_spare_servers,
'max_requests' => $max_requests,
'idle_timeout' => $idle_timeout,
'limit_extensions' => $limit_extensions
); );
Database::pexecute($ins_stmt, $ins_data, true, true); Database::pexecute($ins_stmt, $ins_data, true, true);
$ins_data['id'] = Database::lastInsertId(); $ins_data['id'] = Database::lastInsertId();
@@ -272,6 +317,15 @@ class PhpSettings extends ApiCommand implements ResourceEntity
$fpm_reqtermtimeout = $this->getParam('phpfpm_reqtermtimeout', true, $result['fpm_reqterm']); $fpm_reqtermtimeout = $this->getParam('phpfpm_reqtermtimeout', true, $result['fpm_reqterm']);
$fpm_reqslowtimeout = $this->getParam('phpfpm_reqslowtimeout', true, $result['fpm_reqslow']); $fpm_reqslowtimeout = $this->getParam('phpfpm_reqslowtimeout', true, $result['fpm_reqslow']);
$fpm_pass_authorizationheader = $this->getParam('phpfpm_pass_authorizationheader', true, $result['pass_authorizationheader']); $fpm_pass_authorizationheader = $this->getParam('phpfpm_pass_authorizationheader', true, $result['pass_authorizationheader']);
$override_fpmconfig = $this->getParam('override_fpmconfig', true, $result['override_fpmconfig']);
$pmanager = $this->getParam('pm', true, $result['pm']);
$max_children = $this->getParam('max_children', true, $result['max_children']);
$start_servers = $this->getParam('start_servers', true, $result['start_servers']);
$min_spare_servers = $this->getParam('min_spare_servers', true, $result['min_spare_servers']);
$max_spare_servers = $this->getParam('max_spare_servers', true, $result['max_spare_servers']);
$max_requests = $this->getParam('max_requests', true, $result['max_requests']);
$idle_timeout = $this->getParam('idle_timeout', true, $result['idle_timeout']);
$limit_extensions = $this->getParam('limit_extensions', true, $result['limit_extensions']);
// validation // validation
$description = validate($description, 'description', '', '', array(), true); $description = validate($description, 'description', '', '', array(), true);
@@ -294,9 +348,22 @@ class PhpSettings extends ApiCommand implements ResourceEntity
$fpm_reqtermtimeout = 0; $fpm_reqtermtimeout = 0;
$fpm_reqslowtimeout = 0; $fpm_reqslowtimeout = 0;
$fpm_pass_authorizationheader = 0; $fpm_pass_authorizationheader = 0;
$override_fpmconfig = 0;
} elseif (Settings::Get('phpfpm.enabled') == 1) { } elseif (Settings::Get('phpfpm.enabled') == 1) {
$fpm_reqtermtimeout = validate($fpm_reqtermtimeout, 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true); $fpm_reqtermtimeout = validate($fpm_reqtermtimeout, 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true);
$fpm_reqslowtimeout = validate($fpm_reqslowtimeout, 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true); $fpm_reqslowtimeout = validate($fpm_reqslowtimeout, 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/', '', array(), true);
if (! in_array($pmanager, array(
'static',
'dynamic',
'ondemand'
))) {
throw new ErrorException("Unknown process manager", 406);
}
if (empty($limit_extensions)) {
$limit_extensions = '.php';
}
$limit_extensions = validate($limit_extensions, 'limit_extensions', '/^(\.[a-z]([a-z0-9]+)\ ?)+$/', '', array(), true);
// disable fcgid stuff // disable fcgid stuff
$binary = '/usr/bin/php-cgi'; $binary = '/usr/bin/php-cgi';
$file_extensions = 'php'; $file_extensions = 'php';
@@ -322,7 +389,16 @@ class PhpSettings extends ApiCommand implements ResourceEntity
`fpm_reqslow` = :fpmreqslow, `fpm_reqslow` = :fpmreqslow,
`phpsettings` = :phpsettings, `phpsettings` = :phpsettings,
`fpmsettingid` = :fpmsettingid, `fpmsettingid` = :fpmsettingid,
`pass_authorizationheader` = :fpmpassauth `pass_authorizationheader` = :fpmpassauth,
`override_fpmconfig` = :ofc,
`pm` = :pm,
`max_children` = :max_children,
`start_servers` = :start_servers,
`min_spare_servers` = :min_spare_servers,
`max_spare_servers` = :max_spare_servers,
`max_requests` = :max_requests,
`idle_timeout` = :idle_timeout,
`limit_extensions` = :limit_extensions
WHERE `id` = :id WHERE `id` = :id
"); ");
$upd_data = array( $upd_data = array(
@@ -338,6 +414,15 @@ class PhpSettings extends ApiCommand implements ResourceEntity
'phpsettings' => $phpsettings, 'phpsettings' => $phpsettings,
'fpmsettingid' => $fpm_config_id, 'fpmsettingid' => $fpm_config_id,
'fpmpassauth' => $fpm_pass_authorizationheader, 'fpmpassauth' => $fpm_pass_authorizationheader,
'ofc' => $override_fpmconfig,
'pm' => $pmanager,
'max_children' => $max_children,
'start_servers' => $start_servers,
'min_spare_servers' => $min_spare_servers,
'max_spare_servers' => $max_spare_servers,
'max_requests' => $max_requests,
'idle_timeout' => $idle_timeout,
'limit_extensions' => $limit_extensions,
'id' => $id 'id' => $id
); );
Database::pexecute($upd_stmt, $upd_data, true, true); Database::pexecute($upd_stmt, $upd_data, true, true);

View File

@@ -91,6 +91,18 @@ class phpinterface_fpm
$fh = @fopen($this->getConfigFile(), 'w'); $fh = @fopen($this->getConfigFile(), 'w');
if ($fh) { if ($fh) {
if ($phpconfig['override_fpmconfig'] == 1) {
$this->_fpm_cfg['pm'] = $phpconfig['pm'];
$this->_fpm_cfg['max_children'] = $phpconfig['max_children'];
$this->_fpm_cfg['start_servers'] = $phpconfig['start_servers'];
$this->_fpm_cfg['min_spare_servers'] = $phpconfig['min_spare_servers'];
$this->_fpm_cfg['max_spare_servers'] = $phpconfig['max_spare_servers'];
$this->_fpm_cfg['max_requests'] = $phpconfig['max_requests'];
$this->_fpm_cfg['idle_timeout'] = $phpconfig['idle_timeout'];
$this->_fpm_cfg['limit_extensions'] = $phpconfig['limit_extensions'];
}
$fpm_pm = $this->_fpm_cfg['pm']; $fpm_pm = $this->_fpm_cfg['pm'];
$fpm_children = (int) $this->_fpm_cfg['max_children']; $fpm_children = (int) $this->_fpm_cfg['max_children'];
$fpm_start_servers = (int) $this->_fpm_cfg['start_servers']; $fpm_start_servers = (int) $this->_fpm_cfg['start_servers'];

View File

@@ -99,6 +99,70 @@ return array(
), ),
'value' => array() 'value' => array()
), ),
'override_fpmconfig' => array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'pm' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select',
'select_var' => $pm_select
),
'max_children' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 1
),
'start_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 20
),
'min_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 5
),
'max_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 35
),
'max_requests' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 0
),
'idle_timeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => 30
),
'limit_extensions' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text',
'value' => '.php'
),
'phpsettings' => array( 'phpsettings' => array(
'style' => 'align-top', 'style' => 'align-top',
'label' => $lng['admin']['phpsettings']['phpinisettings'], 'label' => $lng['admin']['phpsettings']['phpinisettings'],

View File

@@ -102,6 +102,70 @@ return array(
), ),
'value' => array($result['pass_authorizationheader']) 'value' => array($result['pass_authorizationheader'])
), ),
'override_fpmconfig' => array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['override_fpmconfig'])
),
'pm' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select',
'select_var' => $pm_select
),
'max_children' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['max_children']
),
'start_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['start_servers']
),
'min_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['min_spare_servers']
),
'max_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['max_spare_servers']
),
'max_requests' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['max_requests']
),
'idle_timeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int',
'value' => $result['idle_timeout']
),
'limit_extensions' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text',
'value' => $result['limit_extensions']
),
'phpsettings' => array( 'phpsettings' => array(
'style' => 'align-top', 'style' => 'align-top',
'label' => $lng['admin']['phpsettings']['phpinisettings'], 'label' => $lng['admin']['phpsettings']['phpinisettings'],

View File

@@ -19,7 +19,7 @@
$version = '0.10.0'; $version = '0.10.0';
// Database version (YYYYMMDDC where C is a daily counter) // Database version (YYYYMMDDC where C is a daily counter)
$dbversion = '201809180'; $dbversion = '201809280';
// Distribution branding-tag (used for Debian etc.) // Distribution branding-tag (used for Debian etc.)
$branding = ''; $branding = '';

View File

@@ -2127,6 +2127,8 @@ $lng['admin']['plans']['use_plan'] = 'Apply plan';
$lng['question']['plan_reallydelete'] = 'Do you really want to delete the hosting plan %s?'; $lng['question']['plan_reallydelete'] = 'Do you really want to delete the hosting plan %s?';
$lng['admin']['notryfiles']['title'] = 'No autogenerated try_files'; $lng['admin']['notryfiles']['title'] = 'No autogenerated try_files';
$lng['admin']['notryfiles']['description'] = 'Say yes here if you want to specify a custom try_files directive in specialsettings (needed for some wordpress plugins for example).'; $lng['admin']['notryfiles']['description'] = 'Say yes here if you want to specify a custom try_files directive in specialsettings (needed for some wordpress plugins for example).';
$lng['serversettings']['phpfpm_settings']['override_fpmconfig'] = 'Override FPM-daemon settings (pm, max_children, etc.)';
$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'] = '<br /><span class="red">Only used if "Override FPM-daemon settings" is set to "Yes"</span>';
// added in froxlor 0.10.0 // added in froxlor 0.10.0
$lng['panel']['none_value'] = 'None'; $lng['panel']['none_value'] = 'None';

View File

@@ -1777,6 +1777,8 @@ $lng['admin']['plans']['use_plan'] = 'Plan übernehmen';
$lng['question']['plan_reallydelete'] = 'Wollen Sie den Hosting-Plan "%s" wirklich löschen?'; $lng['question']['plan_reallydelete'] = 'Wollen Sie den Hosting-Plan "%s" wirklich löschen?';
$lng['admin']['notryfiles']['title'] = 'Keine generierte try_files Anweisung'; $lng['admin']['notryfiles']['title'] = 'Keine generierte try_files Anweisung';
$lng['admin']['notryfiles']['description'] = 'Wähle "Ja", wenn eine eigene try_files Direktive in den "eigenen Vhost Einstellungen" angegeben werden soll (z.B. nötig für manche Wordpress Plugins).'; $lng['admin']['notryfiles']['description'] = 'Wähle "Ja", wenn eine eigene try_files Direktive in den "eigenen Vhost Einstellungen" angegeben werden soll (z.B. nötig für manche Wordpress Plugins).';
$lng['serversettings']['phpfpm_settings']['override_fpmconfig'] = 'Überschreibe FPM-Daemon Einstellungen (pm, max_children, etc.)';
$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'] = '<br /><span class="red">Nur verwendet wenn "Überschreibe FPM-Daemon Einstellungen" auf "Ja" gestellt ist</span>';
// added in froxlor 0.10.0 // added in froxlor 0.10.0
$lng['panel']['none_value'] = 'Keine'; $lng['panel']['none_value'] = 'Keine';