add php 8.2 and also add support for cloud linux 8

This commit is contained in:
usmannasir
2023-09-12 23:20:54 +05:00
parent 88a182fb03
commit 30c7ee658a
6 changed files with 94 additions and 101 deletions

View File

@@ -242,13 +242,23 @@ class phpUtilities:
@staticmethod
def FindIfSaidPHPIsAvaiableOtherwiseMaketheNextOneAvailableToUse(vhFile, phpVersion):
result = phpUtilities.GetPHPVersionFromFile(vhFile)
if vhFile != None:
result = phpUtilities.GetPHPVersionFromFile(vhFile)
if os.path.exists(result):
return phpVersion
if os.path.exists(result):
return phpVersion
else:
from managePHP.phpManager import PHPManager
return PHPManager.findPHPVersions()[-2]
else:
from managePHP.phpManager import PHPManager
return PHPManager.findPHPVersions()[-2]
php = PHPManager.getPHPString(phpVersion)
finalPath = f'/usr/local/lsws/lsphp{php}/bin/php'
if os.path.exists(finalPath):
return phpVersion
else:
from managePHP.phpManager import PHPManager
return PHPManager.findPHPVersions()[-2]