mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
pssobile bug in wp installer
This commit is contained in:
@@ -618,11 +618,17 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
### lets first find php path
|
### lets first find php path
|
||||||
|
|
||||||
|
|
||||||
from plogical.phpUtilities import phpUtilities
|
from plogical.phpUtilities import phpUtilities
|
||||||
|
|
||||||
vhFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf'
|
vhFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf'
|
||||||
|
|
||||||
phpPath = phpUtilities.GetPHPVersionFromFile(vhFile)
|
try:
|
||||||
|
|
||||||
|
phpPath = phpUtilities.GetPHPVersionFromFile(vhFile)
|
||||||
|
except:
|
||||||
|
phpPath = '/usr/local/lsws/lsphp80/bin/php'
|
||||||
|
|
||||||
|
|
||||||
### basically for now php 8.0 is being checked
|
### basically for now php 8.0 is being checked
|
||||||
|
|
||||||
@@ -632,6 +638,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
statusFile.close()
|
statusFile.close()
|
||||||
phpUtilities.InstallSaidPHP('80')
|
phpUtilities.InstallSaidPHP('80')
|
||||||
|
|
||||||
|
|
||||||
finalPath = ''
|
finalPath = ''
|
||||||
self.permPath = ''
|
self.permPath = ''
|
||||||
|
|
||||||
|
|||||||
@@ -227,6 +227,8 @@ class phpUtilities:
|
|||||||
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'):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(f'VHFile in GetPHPVersion {vhFile}')
|
||||||
|
|
||||||
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
|
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
|
||||||
command = f'grep -Eo "/usr/local/lsws/lsphp[0-9]+/bin/lsphp" {vhFile}'
|
command = f'grep -Eo "/usr/local/lsws/lsphp[0-9]+/bin/lsphp" {vhFile}'
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
import subprocess
|
|
||||||
|
|
||||||
# Run the shell command and capture the output
|
|
||||||
result = subprocess.run(['ls', '-la'], capture_output=True, text=True)
|
|
||||||
|
|
||||||
# Get the lines containing 'lsphp' in the output
|
|
||||||
lsphp_lines = [line for line in result.stdout.split('\n') if 'lsphp' in line]
|
|
||||||
|
|
||||||
# Extract the version from the lines
|
|
||||||
php_versions = [line.split()[8] for line in lsphp_lines]
|
|
||||||
|
|
||||||
print(php_versions)
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user