From 7d03fb6de16dfe9036aafc241e2c46e5bda64ef4 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Sat, 20 May 2023 00:00:58 +0500 Subject: [PATCH] bug fix php fpm tune ref: https://github.com/usmannasir/cyberpanel/issues/1070 --- websiteFunctions/website.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 6cfa3160c..7255b54e5 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -4637,18 +4637,29 @@ StrictHostKeyChecking no phpPath = phpPath.split('/') + if os.path.exists(ProcessUtilities.debugPath): + logging.CyberCPLogFileWriter.writeToFile(f'PHP path in tune settings {phpPath}') + if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8: if phpPath[1] == 'etc': phpVersion = phpPath[4][3] + phpPath[4][4] + phpVersion = f'PHP {phpPath[4][3]}.{phpPath[4][4]}' else: phpVersion = phpPath[3][3] + phpPath[3][4] + phpVersion = f'PHP {phpPath[3][3]}.{phpPath[3][4]}' else: phpVersion = f'PHP {phpPath[2]}' - php = PHPManager.getPHPString(phpVersion) + #php = PHPManager.getPHPString(phpVersion) + + if os.path.exists(ProcessUtilities.debugPath): + logging.CyberCPLogFileWriter.writeToFile(f'PHP Version in tune settings {phpVersion}') phpService = ApacheVhost.DecideFPMServiceName(phpVersion) + if os.path.exists(ProcessUtilities.debugPath): + logging.CyberCPLogFileWriter.writeToFile(f'PHP service in tune settings {phpService}') + command = f"systemctl stop {phpService}" ProcessUtilities.normalExecutioner(command)