diff --git a/install/dist/conf/debian120.conf.php b/install/dist/conf/debian120.conf.php new file mode 100644 index 0000000000000000000000000000000000000000..bd6773c62306e3eedc12fe487f6290ce51b2c133 --- /dev/null +++ b/install/dist/conf/debian120.conf.php @@ -0,0 +1,244 @@ + diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php index e2fa04f8ab9bf5b6b63ce234d941b65af3e32c91..145e213d0c55992e9475b0f13a831845bdadeab7 100644 --- a/install/dist/conf/debiantesting.conf.php +++ b/install/dist/conf/debiantesting.conf.php @@ -43,7 +43,7 @@ $conf['init_scripts'] = '/etc/init.d'; $conf['runlevel'] = '/etc'; $conf['shells'] = '/etc/shells'; $conf['pam'] = '/etc/pam.d'; -$conf['default_php'] = "8.1"; +$conf['default_php'] = "8.2"; //* Services provided by this server, this selection will be overridden by the expert mode $conf['services']['mail'] = true; @@ -85,8 +85,8 @@ $conf['apache']['version'] = '2.4'; $conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available'; $conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled'; $conf['apache']['vhost_port'] = '8080'; -$conf['apache']['php_ini_path_apache'] = '/etc/php/7.4/apache2/php.ini'; -$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.4/cgi/php.ini'; +$conf['apache']['php_ini_path_apache'] = '/etc/php/8.2/apache2/php.ini'; +$conf['apache']['php_ini_path_cgi'] = '/etc/php/8.2/cgi/php.ini'; //* Website base settings $conf['web']['website_basedir'] = '/var/www'; @@ -101,7 +101,7 @@ $conf['web']['apps_vhost_user'] = 'ispapps'; $conf['web']['apps_vhost_group'] = 'ispapps'; //* Fastcgi -$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.4/cgi/'; +$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/8.2/cgi/'; $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/'; $conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi'; @@ -212,11 +212,11 @@ $conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled'; $conf['nginx']['init_script'] = 'nginx'; $conf['nginx']['vhost_port'] = '8080'; $conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket'; -$conf['nginx']['php_fpm_init_script'] = 'php7.4-fpm'; -$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.4/fpm/php.ini'; -$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.4/fpm/pool.d'; +$conf['nginx']['php_fpm_init_script'] = 'php8.2-fpm'; +$conf['nginx']['php_fpm_ini_path'] = '/etc/php/8.2/fpm/php.ini'; +$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/8.2/fpm/pool.d'; $conf['nginx']['php_fpm_start_port'] = 9010; -$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.4-fpm'; +$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php8.2-fpm'; //* OpenVZ $conf['openvz']['installed'] = false; diff --git a/install/lib/classes/tpl.inc.php b/install/lib/classes/tpl.inc.php index 2bea1e1fd5474a0dcdfcc53da56a67fcf9e031a7..12f2523a367418dbc351742cb0fea5974d3d20e1 100644 --- a/install/lib/classes/tpl.inc.php +++ b/install/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ if (!defined('vlibTemplateClassLoaded')) { include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_error.inc.php'; include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass{ /*-----------------------------------------------------------------------------\ | ATTENTION | diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 5a0b0ceaf51d8e3666308c89549aa4c249d2717f..885432f7efc94429f2e7a685836b32e79b58c3e1 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -252,6 +252,13 @@ function get_distname() { $distid = 'debian60'; $distbaseid = 'debian'; swriteln("Operating System: Debian 11.0 (Bullseye) or compatible\n"); + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') { + $distname = 'Debian'; + $distver = 'Bookworm'; + $distconfid = 'debian120'; + $distid = 'debian60'; + $distbaseid = 'debian'; + swriteln("Operating System: Debian 12.0 (Bookworm) or compatible\n"); } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 43d312b0e6dedab51730672853bdbb7d678174b7..92b2c0177e659569afb2dff82413ca8c5710092f 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -28,7 +28,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -class installer_base { +class installer_base extends stdClass { var $wb = array(); var $language = 'en'; diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index 0350e28051af0ed1f70a057fad759d7c0806632f..17c88b837a989f12336247fc37f5f6abfeb26d75 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -46,7 +46,7 @@ if(DEVSYSTEM !== true) { /* Application Class */ -class app { +class app extends stdClass { private $_language_inc = 0; private $_wb; diff --git a/interface/lib/classes/tpl.inc.php b/interface/lib/classes/tpl.inc.php index 977ed0901d1d5c0573cc736208d2f05cc339cc00..e999ba5bfe4986416e10927b80cfcf6d0dc1fad7 100644 --- a/interface/lib/classes/tpl.inc.php +++ b/interface/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ if (!defined('vlibTemplateClassLoaded')) { include_once ISPC_CLASS_PATH.'/tpl_error.inc.php'; include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass{ /*-----------------------------------------------------------------------------\ | ATTENTION | diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index 940e0cae812342d4aa12e26bd095ddd22c00facb..4bd7360218e6f39cf77dad1ad9e42498da4f8b9d 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -50,7 +50,7 @@ if(DEVSYSTEM !== true) { * @license bsd-3-clause * @link empty **/ -class app { +class app extends stdClass { /** @var array List of modules that have been loaded. */ var $loaded_modules = []; /** @var array List of plugins that have been loaded. */ diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index fa1ea26babb92ef6bb6745959115516eaa3f8fd4..86fe3e672dbeb1c7638aa33b8aa6f38ba9710ff2 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -231,6 +231,12 @@ class monitor_tools { $distconfid = 'debian110'; $distid = 'debian60'; $distbaseid = 'debian'; + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') { + $distname = 'Debian'; + $distver = 'Bookworm'; + $distconfid = 'debian120'; + $distid = 'debian60'; + $distbaseid = 'debian'; } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; diff --git a/server/lib/classes/tpl.inc.php b/server/lib/classes/tpl.inc.php index a4ba1602529663254b096a91e3151ed6c6d29aec..b1f2cb8b35ccc94c61b797149cc0d790f2103656 100644 --- a/server/lib/classes/tpl.inc.php +++ b/server/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ if (!defined('vlibTemplateClassLoaded')) { include_once ISPC_CLASS_PATH.'/tpl_error.inc.php'; include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass { /*-----------------------------------------------------------------------------\ | ATTENTION | diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php index be81fb62a46c64baf21a94a8d9763fa0b2afea95..02455c1eb2fe662800c9b83d7de8d09f7e7397a5 100644 --- a/server/plugins-available/postfix_server_plugin.inc.php +++ b/server/plugins-available/postfix_server_plugin.inc.php @@ -340,7 +340,7 @@ class postfix_server_plugin { foreach ($options as $key => $value) { $value = trim($value); if ($value == '') continue; - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -348,7 +348,7 @@ class postfix_server_plugin { if (isset($configure_lmtp) && $configure_lmtp && $mail_config['content_filter'] == 'amavisd') { for ($i = 0; isset($new_options[$i]); $i++) { if ($new_options[$i] == 'reject_unlisted_recipient') { - array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf")); + array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf")); $app->system->exec_safe("postconf -e ?", 'address_verify_virtual_transport = smtp:[127.0.0.1]:10025'); $app->system->exec_safe("postconf -e ?", 'address_verify_transport_maps = static:smtp:[127.0.0.1]:10025'); @@ -378,7 +378,7 @@ class postfix_server_plugin { exec("postconf -e 'milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}'"); exec("postconf -e 'milter_default_action = accept'"); - exec("postconf -e 'smtpd_sender_restrictions = ${raslm} permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender'"); + exec("postconf -e 'smtpd_sender_restrictions = {$raslm} permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, {$rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender'"); $new_options = array(); $options = preg_split("/,\s*/", exec("postconf -h smtpd_recipient_restrictions")); @@ -388,7 +388,7 @@ class postfix_server_plugin { if (preg_match('/check_policy_service\s+inet:127.0.0.1:10023/', $value)) { continue; } - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -420,7 +420,7 @@ class postfix_server_plugin { exec("postconf -e 'content_filter = " . ($configure_lmtp ? "lmtp" : "amavis" ) . ":[127.0.0.1]:10024'"); // fixme: should read this from conf templates - exec("postconf -e 'smtpd_sender_restrictions = ${raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re'"); + exec("postconf -e 'smtpd_sender_restrictions = {$raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, {$rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re'"); } if($mail_config['content_filter'] == 'rspamd' && ($mail_config['rspamd_password'] != $old_ini_data['mail']['rspamd_password'] || $mail_config['content_filter'] != $old_ini_data['mail']['content_filter'])) { diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 53500ef06949a14ba1df64a406b04cb86a0d06f4..57663c8d43a437860a6801ecf312c15dcf68cd8c 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -528,10 +528,10 @@ class rspamd_plugin { ); foreach ($local_d as $f) { $tpl = new tpl(); - if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_${f}.master")) { - $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_${f}.master"); + if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_{$f}.master")) { + $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_{$f}.master"); } else { - $tpl->newTemplate("rspamd_${f}.master"); + $tpl->newTemplate("rspamd_{$f}.master"); } $tpl->setVar('dkim_path', $mail_config['dkim_path']); @@ -543,7 +543,7 @@ class rspamd_plugin { $tpl->setLoop('local_addrs', $local_addrs); } - $app->system->file_put_contents("/etc/rspamd/local.d/${f}", $tpl->grab()); + $app->system->file_put_contents("/etc/rspamd/local.d/{$f}", $tpl->grab()); if($mail_config['content_filter'] == 'rspamd'){ $app->services->restartServiceDelayed('rspamd', 'reload');