mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix: shift to default package if package not exists on wp restore backup
This commit is contained in:
@@ -236,10 +236,10 @@ class phpUtilities:
|
||||
finalConfPath = ApacheVhost.configBasePath + domainName + '.conf'
|
||||
if os.path.exists(finalConfPath):
|
||||
command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"'
|
||||
result = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n')
|
||||
php_version = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n')
|
||||
|
||||
# Input string
|
||||
php_version = "php73"
|
||||
#php_version = "php73"
|
||||
|
||||
# Insert a period between '7' and '3' to convert it to 'php7.3'
|
||||
converted_version = php_version[:4] + '.' + php_version[4:]
|
||||
@@ -277,7 +277,8 @@ class phpUtilities:
|
||||
logging.CyberCPLogFileWriter.writeToFile(result)
|
||||
|
||||
command = result + " -v 2>/dev/null | awk '/^PHP/ {print $2}'"
|
||||
php_version = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n')
|
||||
php_version = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n')[:3]
|
||||
|
||||
return f"PHP {php_version}"
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user