diff --git a/install/update.php b/install/update.php index 803e47d435a766349388aea4fb6307d821478b82..0e8f6bd38c4b096dd0b20e2d755d07e5b479a362 100644 --- a/install/update.php +++ b/install/update.php @@ -456,7 +456,7 @@ if($update_crontab_answer == 'yes') { //** Restart services: if($reconfigure_services_answer == 'yes') { swriteln('Restarting services ...'); - if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart')); + if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1'); if($conf['services']['mail']) { if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index aadfbf3e246a1fb369abad9a28bb7062f8621b14..b92cae59d1f89a8fac89e56b3200b02f335a4b38 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1765,8 +1765,8 @@ class system{ global $app; $cmd = ''; - if(is_installed('apache2ctl')) $cmd = 'apache2ctl -t -D DUMP_MODULES'; - elseif(is_installed('apachectl')) $cmd = 'apachectl -t -D DUMP_MODULES'; + if($this->is_installed('apache2ctl')) $cmd = 'apache2ctl -t -D DUMP_MODULES'; + elseif($this->is_installed('apachectl')) $cmd = 'apachectl -t -D DUMP_MODULES'; else { $app->log("Could not check apache modules, apachectl not found.", LOGLEVEL_WARN); return array(); diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 7c1903a13af2c1df3b490c19a60b3d32a8c503ce..969851d49cba5d70bcc428e02064c3372fc1b3cb 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1275,8 +1275,10 @@ class apache2_plugin { $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); if(substr($socket_dir, -1) != '/') $socket_dir .= '/'; - // User sockets, but not with apache 2.4 as socket support is buggy in that version - if($data['new']['php_fpm_use_socket'] == 'y' && $app->system->getapacheversion() < 2.4){ + $apache_modules = $app->system->getapachemodules(); + + // Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version + if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){ $use_tcp = 0; $use_socket = 1; } else {