diff --git a/install/sql/incremental/upd_0032.sql b/install/sql/incremental/upd_0032.sql new file mode 100644 index 0000000000000000000000000000000000000000..02e2178174ede90ab52f8555ae084c8c083b1856 --- /dev/null +++ b/install/sql/incremental/upd_0032.sql @@ -0,0 +1,2 @@ +ALTER TABLE `web_domain` ADD `pm` ENUM( 'static', 'dynamic', 'ondemand' ) NOT NULL DEFAULT 'dynamic' AFTER `php_fpm_use_socket`; +ALTER TABLE `web_domain` ADD `pm_process_idle_timeout` INT NOT NULL DEFAULT '10' AFTER `pm_max_spare_servers` , ADD `pm_max_requests` INT NOT NULL DEFAULT '0' AFTER `pm_process_idle_timeout`; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 779cbf70e74ba4ef0273046d0efb013d5a8fb760..fe97e9ca3d9a83ab84d486b3e31b2f96d422575c 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1564,10 +1564,13 @@ CREATE TABLE `web_domain` ( `apache_directives` mediumtext, `nginx_directives` mediumtext, `php_fpm_use_socket` ENUM('n','y') NOT NULL DEFAULT 'n', + `pm` enum('static','dynamic','ondemand') NOT NULL DEFAULT 'dynamic', `pm_max_children` int(11) NOT NULL DEFAULT '10', `pm_start_servers` int(11) NOT NULL DEFAULT '2', `pm_min_spare_servers` int(11) NOT NULL DEFAULT '1', `pm_max_spare_servers` int(11) NOT NULL DEFAULT '5', + `pm_process_idle_timeout` int(11) NOT NULL DEFAULT '10', + `pm_max_requests` int(11) NOT NULL DEFAULT '0', `php_open_basedir` mediumtext, `custom_php_ini` mediumtext, `backup_interval` VARCHAR( 255 ) NOT NULL DEFAULT 'none', diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php index 3b27287ab65f141c90955385903be8db4498e29f..ce835a94b353ea269ba87b424d0625f376c11f59 100644 --- a/interface/web/sites/form/web_domain.tform.php +++ b/interface/web/sites/form/web_domain.tform.php @@ -542,6 +542,12 @@ $form["tabs"]['advanced'] = array ( 'default' => 'n', 'value' => array(0 => 'n',1 => 'y') ), + 'pm' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => 'dynamic', + 'value' => array('static' => 'static', 'dynamic' => 'dynamic', 'ondemand' => 'ondemand (PHP Version >= 5.3.9)') + ), 'pm_max_children' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -590,6 +596,30 @@ $form["tabs"]['advanced'] = array ( 'width' => '3', 'maxlength' => '3' ), + 'pm_process_idle_timeout' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^([1-9][0-9]{0,10})$/', + 'errmsg'=> 'pm_process_idle_timeout_error_regex'), + ), + 'default' => '10', + 'value' => '', + 'width' => '3', + 'maxlength' => '6' + ), + 'pm_max_requests' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^([0-9]{1,11})$/', + 'errmsg'=> 'pm_max_requests_error_regex'), + ), + 'default' => '0', + 'value' => '', + 'width' => '3', + 'maxlength' => '6' + ), 'php_open_basedir' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/sites/lib/lang/de_web_domain.lng b/interface/web/sites/lib/lang/de_web_domain.lng index a1e9975c405d041d012bf1a96a24fba67e62fc9e..6f941db93a0ff61d64f1ee7d3a1eea80fb7247b7 100644 --- a/interface/web/sites/lib/lang/de_web_domain.lng +++ b/interface/web/sites/lib/lang/de_web_domain.lng @@ -92,4 +92,10 @@ $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers muß $wb['hd_quota_error_regex'] = 'Harddisk Quota ist ungültig.'; $wb['traffic_quota_error_regex'] = 'Traffic Quota ist ungültig.'; $wb["fastcgi_php_version_txt"] = 'PHP-Version'; +$wb["pm_txt"] = 'PHP-FPM Process Manager'; +$wb["pm_process_idle_timeout_txt"] = 'PHP-FPM pm.process_idle_timeout'; +$wb["pm_max_requests_txt"] = 'PHP-FPM pm.max_requests'; +$wb["pm_process_idle_timeout_error_regex"] = 'PHP-FPM pm.process_idle_timeout muß eine positive ganze Zahl sein.'; +$wb["pm_max_requests_error_regex"] = 'PHP-FPM pm.max_requests muß eine ganze Zahl >= 0 sein.'; +$wb["pm_ondemand_hint_txt"] = 'Bitte beachten Sie, daß Ihre PHP-Version >= 5.3.9 sein muß, wenn Sie den ondemand Process-Manager nutzen möchten. Wenn Sie ondemand für eine ältere PHP-Version auswählen, wird PHP nicht mehr starten!'; ?> diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng index 0b4f7fc5fe6ab867d6b2754aee0e44e96e5f568d..b16af757aa8d2997a3574b61e0b7c1ea197b2bc7 100644 --- a/interface/web/sites/lib/lang/en_web_domain.lng +++ b/interface/web/sites/lib/lang/en_web_domain.lng @@ -92,4 +92,10 @@ $wb["pm_max_spare_servers_error_regex"] = 'PHP-FPM pm.max_spare_servers must be $wb["hd_quota_error_regex"] = 'Harddisk quota is invalid.'; $wb["traffic_quota_error_regex"] = 'Traffic quota is invalid.'; $wb["fastcgi_php_version_txt"] = 'PHP Version'; +$wb["pm_txt"] = 'PHP-FPM Process Manager'; +$wb["pm_process_idle_timeout_txt"] = 'PHP-FPM pm.process_idle_timeout'; +$wb["pm_max_requests_txt"] = 'PHP-FPM pm.max_requests'; +$wb["pm_process_idle_timeout_error_regex"] = 'PHP-FPM pm.process_idle_timeout must be a positive integer value.'; +$wb["pm_max_requests_error_regex"] = 'PHP-FPM pm.max_requests must be an integer value >= 0.'; +$wb["pm_ondemand_hint_txt"] = 'Please note that you must have PHP version >= 5.3.9 in order to use the ondemand process manager. If you select ondemand for an older PHP version, PHP will not start anymore!'; ?> \ No newline at end of file diff --git a/interface/web/sites/templates/web_domain_advanced.htm b/interface/web/sites/templates/web_domain_advanced.htm index 9665f423dca243d040b8bc0131a04f50ccfb352b..a9819e017e4f5f91bdd7fc475f0b756e25e80210 100644 --- a/interface/web/sites/templates/web_domain_advanced.htm +++ b/interface/web/sites/templates/web_domain_advanced.htm @@ -20,28 +20,47 @@ -
{tmpl_var name='php_fpm_use_socket_txt'}