From c7ab115f8929a290822a962619c674eb4342c552 Mon Sep 17 00:00:00 2001 From: florian030 Date: Wed, 25 Jul 2018 15:21:49 +0200 Subject: [PATCH] Add option to "name" default php-version for websites per server (#5089) --- install/tpl/server.ini.master | 1 + interface/web/admin/form/server_config.tform.php | 10 ++++++++++ interface/web/admin/lib/lang/ar_server_config.lng | 2 ++ interface/web/admin/lib/lang/bg_server_config.lng | 2 ++ interface/web/admin/lib/lang/br_server_config.lng | 1 + interface/web/admin/lib/lang/ca_server_config.lng | 2 ++ interface/web/admin/lib/lang/cz_server_config.lng | 2 ++ interface/web/admin/lib/lang/de_server_config.lng | 2 ++ interface/web/admin/lib/lang/dk_server_config.lng | 2 ++ interface/web/admin/lib/lang/el_server_config.lng | 2 ++ interface/web/admin/lib/lang/en_server_config.lng | 2 ++ interface/web/admin/lib/lang/es_server_config.lng | 2 ++ interface/web/admin/lib/lang/fi_server_config.lng | 2 ++ interface/web/admin/lib/lang/fr_server_config.lng | 2 ++ interface/web/admin/lib/lang/hr_server_config.lng | 2 ++ interface/web/admin/lib/lang/hu_server_config.lng | 2 ++ interface/web/admin/lib/lang/id_server_config.lng | 2 ++ interface/web/admin/lib/lang/it_server_config.lng | 2 ++ interface/web/admin/lib/lang/ja_server_config.lng | 2 ++ interface/web/admin/lib/lang/nl_server_config.lng | 2 ++ interface/web/admin/lib/lang/pl_server_config.lng | 2 ++ interface/web/admin/lib/lang/pt_server_config.lng | 2 ++ interface/web/admin/lib/lang/ro_server_config.lng | 2 ++ interface/web/admin/lib/lang/ru_server_config.lng | 2 ++ interface/web/admin/lib/lang/se_server_config.lng | 2 ++ interface/web/admin/lib/lang/sk_server_config.lng | 2 ++ interface/web/admin/lib/lang/tr_server_config.lng | 2 ++ .../web/admin/templates/server_config_web_edit.htm | 5 ++++- interface/web/sites/ajax_get_json.php | 7 +++++++ .../web/sites/templates/web_vhost_domain_edit.htm | 6 +++--- interface/web/sites/web_vhost_domain_edit.php | 9 +++++---- 31 files changed, 79 insertions(+), 8 deletions(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 39c24bc702..079d634488 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -102,6 +102,7 @@ php_fpm_ini_path=/etc/php5/fpm/php.ini php_fpm_pool_dir=/etc/php5/fpm/pool.d php_fpm_start_port=9010 php_fpm_socket_dir=/var/lib/php5-fpm +php_default_name=Default set_folder_permissions_on_update=n add_web_users_to_sshusers_group=y connect_userid_to_webid=n diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index f939c97b37..a39cc3b993 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1094,6 +1094,16 @@ $form["tabs"]['web'] = array( 'width' => '40', 'maxlength' => '255' ), + 'php_default_name' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'Default', + 'validators' => array( 0 => array('type' => 'NOTEMPTY', + 'errmsg' => 'php_default_name_error_empty'), + ), + 'width' => '40', + 'maxlength' => '255' + ), 'php_fpm_init_script' => array( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index 683efce312..55d4c4ffc0 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index 277cee8b9f..74e0405cd7 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index a46db9f1c9..70512ea935 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -291,4 +291,5 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; ?> diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng index 3d8491cf99..fbd3e1ea0a 100644 --- a/interface/web/admin/lib/lang/ca_server_config.lng +++ b/interface/web/admin/lib/lang/ca_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index 204828d7a6..54acda96fc 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 6ef8c90c81..f81bb279b3 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Beschreibung Standard PHP'; +$wb['php_default_name_error_empty'] = 'Beschreibung Standard PHP ist leer.'; ?> diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng index fcf4d2007e..61139aa544 100644 --- a/interface/web/admin/lib/lang/dk_server_config.lng +++ b/interface/web/admin/lib/lang/dk_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index f7c475c570..38600769ce 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 5d087356e7..bcbf4ceea8 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -292,4 +292,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index aaee15ec0b..cb0fbf121a 100755 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index 99c1524dc5..6e08e98411 100755 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 43e67450ec..2045dbb8bd 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index 797f0eb71f..99d69fec0c 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index 04370d1b4d..24d2fcb054 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index 2993c5c599..8abd5d6be0 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index cce33cf7e2..a87f3129d5 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index 353aaa809e..f915e86070 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index b1320fc9a6..c8b320b8c5 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index e2288f9050..6f00d524e0 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 9d7fa04cde..62a8a34011 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index e7787e1866..f7c4c57038 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index eb004bcfc7..a95d6e70c9 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index a38c3e6d12..97d3c9f802 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index f20c681e23..cfc0b3ab7d 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index 59a11a28cc..ccf1ed5b9b 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index c0f148271c..bb61d866ca 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -256,7 +256,10 @@
-
+
+ +
+
diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index d79eba2392..9e530514c8 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -97,6 +97,8 @@ if($type == 'getphpfastcgi'){ } elseif($php_type == 'fast-cgi'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'".$sql_where, $server_id); } + $php_records[]=array('name' => $web_config['php_default_name']); + uasort($php_records, 'sort_php'); $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { @@ -243,4 +245,9 @@ if($type == 'getclientssldata'){ header('Content-type: application/json'); echo $json; + +function sort_php($a, $b) { + return strcmp($a['name'], $b['name']); +} + ?> diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 86fd3b294f..149d430887 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -444,8 +444,8 @@ function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) { - var options = ''; - //var options = ''; + //var options = ''; + var options = ''; var phpfastcgiselected = ''; $.each(data, function(key, val) { @@ -468,7 +468,7 @@ phpfastcgiselected = ''; - options += ''; + //options += ''; $('#fastcgi_php_version').html(options).change(); if(noFormChange) ISPConfig.resetFormChanged(); }); diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 1fa9a6a5ac..4f2206c679 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -239,6 +239,7 @@ class page_action extends tform_actions { //PHP Version Selection (FastCGI) $server_type = 'apache'; +//print_r($web_config[$server_id]);exit; if(!empty($web_config[$server_id]['server_type'])) $server_type = $web_config[$server_id]['server_type']; if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm'; @@ -257,7 +258,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -404,7 +405,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -624,7 +625,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'", $parent_domain['server_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -952,7 +953,7 @@ class page_action extends tform_actions { function onSubmit() { global $app, $conf; - +//print_r($this->dataRecord);exit; // Set a few fixed values $this->dataRecord["vhost_type"] = 'name'; if($this->_vhostdomain_type == 'domain') { -- GitLab