Commit ca9a7fd7 authored by Thom's avatar Thom 🛠
Browse files

Add check for default PHP version (#6313)

parent 39bf4b24
Pipeline #12560 passed with stage
in 7 minutes and 24 seconds
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "5.4";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "5.4";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.2";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.3";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.4";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.0";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -32,7 +32,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//* Main
$conf['language'] = 'en';
$conf['distname'] = 'debian110';
$conf['distname'] = 'debian120';
$conf['hostname'] = 'server1.domain.tld'; // Full hostname
$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
......@@ -43,6 +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";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.0";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.2";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -43,6 +43,7 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['pam'] = '/etc/pam.d';
$conf['default_php'] = "7.4";
//* Services provided by this server, this selection will be overridden by the expert mode
$conf['services']['mail'] = true;
......
......@@ -248,8 +248,11 @@ class installer_base {
public function check_prerequisites() {
$msg = '';
if(version_compare(phpversion(), '5.4', '<')) $msg .= "PHP Version 5.4 or newer is required. The currently used PHP version is ".phpversion().".\n";
if(version_compare(phpversion(), '8.2', '>=')) $msg .= "PHP Version 8.2+ is not supported yet. Change PHP version back to the default version of the OS. The currently used PHP version is ".phpversion().".\n";
if ($conf['default_php'] != '') {
if(version_compare(phpversion('tidy'), $conf['default_php'], '==')) $msg .= "Your PHP version is not the OS default. Change the PHP version back to the default version of the OS. The currently used PHP version is " . phpversion() . "The default version for your OS is PHP " . $conf['default_php'] . ".\n";
}
if(version_compare(phpversion(), '5.4', '<')) $msg .= "PHP Version 5.4 or newer is required. The currently used PHP version is " . phpversion() . ".\n";
//if(version_compare(phpversion(), '8.2', '>=')) $msg .= "PHP Version 8.2+ is not supported yet. Change the PHP version back to the default version of the OS. The currently used PHP version is " . phpversion() . ".\n";
if(!function_exists('curl_init')) $msg .= "PHP Curl Module is missing.\n";
if(!function_exists('mysqli_connect')) $msg .= "PHP MySQLi Module is nmissing.\n";
if(!function_exists('mb_detect_encoding')) $msg .= "PHP Multibyte Module (MB) is missing.\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment