Skip to content

Commit 1e67c17

Browse files
author
Till Brehm
committed
- Fixed hanging update on ubuntu 14.10 caused by mysql restart script.
- Fixed: FS#3710 - Bug with PHP-FPM configuration since 3.0.5.4 Patch 4 - Fixed wrong function calls in system lib.
1 parent bc04c3a commit 1e67c17

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

install/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@
456456
//** Restart services:
457457
if($reconfigure_services_answer == 'yes') {
458458
swriteln('Restarting services ...');
459-
if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart'));
459+
if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1');
460460
if($conf['services']['mail']) {
461461
if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart'));
462462
if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart'));

server/lib/classes/system.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,8 +1765,8 @@ function getapachemodules() {
17651765
global $app;
17661766

17671767
$cmd = '';
1768-
if(is_installed('apache2ctl')) $cmd = 'apache2ctl -t -D DUMP_MODULES';
1769-
elseif(is_installed('apachectl')) $cmd = 'apachectl -t -D DUMP_MODULES';
1768+
if($this->is_installed('apache2ctl')) $cmd = 'apache2ctl -t -D DUMP_MODULES';
1769+
elseif($this->is_installed('apachectl')) $cmd = 'apachectl -t -D DUMP_MODULES';
17701770
else {
17711771
$app->log("Could not check apache modules, apachectl not found.", LOGLEVEL_WARN);
17721772
return array();

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,10 @@ function update($event_name, $data) {
12751275
$socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']);
12761276
if(substr($socket_dir, -1) != '/') $socket_dir .= '/';
12771277

1278-
// User sockets, but not with apache 2.4 as socket support is buggy in that version
1279-
if($data['new']['php_fpm_use_socket'] == 'y' && $app->system->getapacheversion() < 2.4){
1278+
$apache_modules = $app->system->getapachemodules();
1279+
1280+
// Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version
1281+
if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){
12801282
$use_tcp = 0;
12811283
$use_socket = 1;
12821284
} else {

0 commit comments

Comments
 (0)