mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
bug fix: fetch apache php path on al8 and 9
This commit is contained in:
@@ -241,15 +241,19 @@ class phpUtilities:
|
|||||||
# Input string
|
# Input string
|
||||||
#php_version = "php73"
|
#php_version = "php73"
|
||||||
|
|
||||||
# Insert a period between '7' and '3' to convert it to 'php7.3'
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
converted_version = php_version[:4] + '.' + php_version[4:]
|
command = f'/opt/remi/{php_version}/root/bin/php'
|
||||||
|
return command
|
||||||
|
else:
|
||||||
|
# Insert a period between '7' and '3' to convert it to 'php7.3'
|
||||||
|
converted_version = php_version[:4] + '.' + php_version[4:]
|
||||||
|
|
||||||
# Output the result
|
# Output the result
|
||||||
print(converted_version)
|
print(converted_version)
|
||||||
|
|
||||||
result = f'/usr/bin/{converted_version}'
|
result = f'/usr/bin/{converted_version}'
|
||||||
#result = result.rsplit("lsphp", 1)[0] + "php"
|
#result = result.rsplit("lsphp", 1)[0] + "php"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if os.path.exists('/usr/local/CyberCP/debug'):
|
if os.path.exists('/usr/local/CyberCP/debug'):
|
||||||
logging.CyberCPLogFileWriter.writeToFile(f'VHFile in GetPHPVersion {vhFile}')
|
logging.CyberCPLogFileWriter.writeToFile(f'VHFile in GetPHPVersion {vhFile}')
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
strr='8.0.30'
|
|
||||||
|
|
||||||
print(strr[:3])
|
|
||||||
Reference in New Issue
Block a user