mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
bug fix in php manager, ref https://www.facebook.com/groups/cyberpanel/posts/3328999637411661/
This commit is contained in:
@@ -1872,12 +1872,15 @@ def getCurrentAdvancedPHPConfig(request):
|
|||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
phpVers = data['phpSelection']
|
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:
|
if request.GET.get('apache', None) == None:
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
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:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
else:
|
else:
|
||||||
@@ -1887,7 +1890,7 @@ def getCurrentAdvancedPHPConfig(request):
|
|||||||
completeName = str(initial) + '.' + str(final)
|
completeName = str(initial) + '.' + str(final)
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
||||||
else:
|
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):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
logging.writeToFile(f'PHP Path {path}')
|
logging.writeToFile(f'PHP Path {path}')
|
||||||
|
|
||||||
@@ -1922,7 +1925,6 @@ def savePHPConfigAdvance(request):
|
|||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
phpVers = data['phpSelection']
|
phpVers = data['phpSelection']
|
||||||
phpVersS = phpVers
|
phpVersS = phpVers
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
|
||||||
|
|
||||||
if request.GET.get('apache', None) == None:
|
if request.GET.get('apache', None) == None:
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
||||||
|
|||||||
Reference in New Issue
Block a user