From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 22 Apr 2016 05:26:17 -0400 Subject: [PATCH] Added PHP 7 check in installer and updater. --- install/update.php | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/install/update.php b/install/update.php index 803e47d..a620c32 100644 --- a/install/update.php +++ b/install/update.php @@ -107,6 +107,11 @@ if($dist['id'] == '') die('Linux distribution or version not recognized.'); +//** Check the PHP Version +if (version_compare(PHP_VERSION, '7.0.0') >= 0) { + die('PHP 7 is not supported by ISPConfig 3.0.5. Plesae use ISPConfig version 3.1 instead.'); +} + //** Include the autoinstaller configuration (for non-interactive setups) error_reporting(E_ALL ^ E_NOTICE); @@ -120,6 +125,10 @@ include_once $cmd_opt['autoinstall']; } elseif($path_parts['extension'] == 'ini') { $tmp = ini_to_array(file_get_contents('autoinstall.ini')); + if(!is_array($tmp['install'])) $tmp['install'] = array(); + if(!is_array($tmp['ssl_cert'])) $tmp['ssl_cert'] = array(); + if(!is_array($tmp['expert'])) $tmp['expert'] = array(); + if(!is_array($tmp['update'])) $tmp['update'] = array(); $autoinstall = $tmp['install'] + $tmp['ssl_cert'] + $tmp['expert'] + $tmp['update']; unset($tmp); } @@ -456,7 +465,7 @@ //** 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')); -- Gitblit v1.9.1