diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 8e43a5aec..c16a1af1c 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -192,6 +192,15 @@ class InstallCyberPanel: if res != 0: InstallCyberPanel.stdOut("Failed to install PHP on Ubuntu.", 1, 1) + command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \ + 'lsphp8? lsphp8?-common lsphp8?-curl lsphp8?-dev lsphp8?-imap lsphp8?-intl lsphp8?-json ' \ + 'lsphp8?-ldap lsphp8?-mysql lsphp8?-opcache lsphp8?-pspell lsphp8?-recode ' \ + 'lsphp8?-sqlite8 lsphp8?-tidy' + + res = os.system(command) + if res != 0: + InstallCyberPanel.stdOut("Failed to install PHP on Ubuntu.", 1, 1) + elif self.distro == centos: command = 'yum -y groupinstall lsphp-all' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) @@ -232,8 +241,11 @@ class InstallCyberPanel: install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + command = 'yum install lsphp80*' + subprocess.call(command, shell=True) + if self.distro == cent8: - command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* --exclude lsphp73-pecl-zip -y' + command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* lsphp80* --exclude lsphp73-pecl-zip -y' subprocess.call(command, shell=True) def installMySQL(self, mysql): diff --git a/managePHP/phpManager.py b/managePHP/phpManager.py index 4a9fed7e2..c4f1ecae3 100755 --- a/managePHP/phpManager.py +++ b/managePHP/phpManager.py @@ -13,13 +13,13 @@ class PHPManager: def findPHPVersions(): distro = ProcessUtilities.decideDistro() if distro == ProcessUtilities.centos: - return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] elif distro == ProcessUtilities.cent8: - return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] elif distro == ProcessUtilities.ubuntu20: - return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] else: - return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] @staticmethod def getPHPString(phpVersion): @@ -42,6 +42,8 @@ class PHPManager: php = "73" elif phpVersion == "PHP 7.4": php = "74" + elif phpVersion == "PHP 8.0": + php = "80" return php diff --git a/plogical/upgrade.py b/plogical/upgrade.py index c329f5438..58a2f2d17 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -1939,6 +1939,10 @@ echo $oConfig->Save() ? 'Done' : 'Error'; Upgrade.executioner(command, 'Install PHP 74, 0') + if Upgrade.installedOutput.find('lsphp80') == -1: + command = 'yum install lsphp80*' + subprocess.call(command, shell=True) + except: command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \ 'lsphp7? lsphp7?-common lsphp7?-curl lsphp7?-dev lsphp7?-imap lsphp7?-intl lsphp7?-json ' \ @@ -1946,6 +1950,13 @@ echo $oConfig->Save() ? 'Done' : 'Error'; 'lsphp7?-sqlite3 lsphp7?-tidy' Upgrade.executioner(command, 'Install PHP 73, 0') + command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \ + 'lsphp8? lsphp8?-common lsphp8?-curl lsphp8?-dev lsphp8?-imap lsphp8?-intl lsphp8?-json ' \ + 'lsphp8?-ldap lsphp8?-mysql lsphp8?-opcache lsphp8?-pspell lsphp8?-recode ' \ + 'lsphp8?-sqlite8 lsphp8?-tidy' + + Upgrade.executioner(command, 'Install PHP 80, 0') + CentOSPath = '/etc/redhat-release' if not os.path.exists(CentOSPath):