Usman Nasir
2021-12-25 12:40:45 +05:00
parent c7071a1a50
commit 6dbcc6ace7
3 changed files with 17 additions and 4 deletions

View File

@@ -200,6 +200,9 @@ class InstallCyberPanel:
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp80*'
os.system(command)
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp81*'
os.system(command)
elif self.distro == centos:
command = 'yum -y groupinstall lsphp-all'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
@@ -241,6 +244,9 @@ class InstallCyberPanel:
command = 'yum install lsphp80* -y'
subprocess.call(command, shell=True)
command = 'yum install lsphp81* -y'
subprocess.call(command, shell=True)
if self.distro == cent8:
command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* lsphp80* --exclude lsphp73-pecl-zip -y'
subprocess.call(command, shell=True)

View File

@@ -14,13 +14,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', 'PHP 8.0']
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', 'PHP 8.1']
elif distro == ProcessUtilities.cent8:
return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0']
return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0', 'PHP 8.1']
elif distro == ProcessUtilities.ubuntu20:
return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0']
return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0', 'PHP 8.1']
else:
return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0']
return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0', 'PHP 8.1']
@staticmethod
def getPHPString(phpVersion):

View File

@@ -2156,6 +2156,10 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = 'yum install lsphp80* -y'
subprocess.call(command, shell=True)
if Upgrade.installedOutput.find('lsphp80') == -1:
command = 'yum install lsphp81* -y'
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 ' \
@@ -2166,6 +2170,9 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp80*'
os.system(command)
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp81*'
os.system(command)
CentOSPath = '/etc/redhat-release'
if not os.path.exists(CentOSPath):