From dc2fe1a67b6b8696458af5c3fcab4759999c8384 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Tue, 16 May 2023 21:02:58 +0500 Subject: [PATCH] bug fix in php manager, ref https://www.facebook.com/groups/cyberpanel/posts/3328999637411661/ --- managePHP/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/managePHP/views.py b/managePHP/views.py index 1a40065dd..81b3ae6de 100755 --- a/managePHP/views.py +++ b/managePHP/views.py @@ -1872,12 +1872,15 @@ def getCurrentAdvancedPHPConfig(request): data = json.loads(request.body) phpVers = data['phpSelection'] - phpVersS = phpVers + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(f"apache value advanced config {request.GET.get('apache', None)}") - phpVers = "php" + PHPManager.getPHPString(phpVers) + phpVersSApache = phpVers if request.GET.get('apache', None) == None: phpVers = "php" + PHPManager.getPHPString(phpVers) + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(f"value of phpvers in ls {phpVers}") if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8: path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini" else: @@ -1887,7 +1890,7 @@ def getCurrentAdvancedPHPConfig(request): completeName = str(initial) + '.' + str(final) path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini" else: - path = f'/etc/php/{phpVersS.split(" ")[1]}/fpm/php.ini' + path = f'/etc/php/{phpVersSApache.split(" ")[1]}/fpm/php.ini' if os.path.exists(ProcessUtilities.debugPath): logging.writeToFile(f'PHP Path {path}') @@ -1922,7 +1925,6 @@ def savePHPConfigAdvance(request): data = json.loads(request.body) phpVers = data['phpSelection'] phpVersS = phpVers - phpVers = "php" + PHPManager.getPHPString(phpVers) if request.GET.get('apache', None) == None: phpVers = "php" + PHPManager.getPHPString(phpVers)