bug fix: to wp install, improved file manager and custom ssl implementation

This commit is contained in:
usmannasir
2025-04-27 15:28:50 +05:00
parent a2e4e4eca5
commit 031a8e7851
11 changed files with 1578 additions and 459 deletions

View File

@@ -2329,8 +2329,26 @@ milter_default_action = accept
command = "chmod +x /usr/local/CyberCP/cli/cyberPanel.py"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
def setupPHPSymlink(self):
try:
# Remove existing PHP symlink if it exists
if os.path.exists('/usr/bin/php'):
os.remove('/usr/bin/php')
# Create symlink to PHP 8.0
command = 'ln -s /usr/local/lsws/lsphp80/bin/php /usr/bin/php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
logging.InstallLog.writeToFile("[setupPHPSymlink] PHP symlink created successfully.")
except OSError as msg:
logging.InstallLog.writeToFile('[ERROR] ' + str(msg) + " [setupPHPSymlink]")
return 0
def setupPHPAndComposer(self):
try:
# First setup the PHP symlink
self.setupPHPSymlink()
if self.distro == ubuntu:
if not os.access('/usr/local/lsws/lsphp70/bin/php', os.R_OK):