mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
redis mh: change php version'
This commit is contained in:
@@ -73,7 +73,7 @@ class PHPManager:
|
|||||||
upload_max_filesize = ""
|
upload_max_filesize = ""
|
||||||
max_input_time = ""
|
max_input_time = ""
|
||||||
|
|
||||||
command = "sudo cat " + PHPManager.FindPHPFPMPath(phpVersion)
|
command = "cat " + PHPManager.FindPHPFPMPath(phpVersion)
|
||||||
|
|
||||||
data = ProcessUtilities.outputExecutioner(command).split('\n')
|
data = ProcessUtilities.outputExecutioner(command).split('\n')
|
||||||
|
|
||||||
|
|||||||
@@ -570,6 +570,7 @@ class vhost:
|
|||||||
return [0, str(msg) + " [IO Error with per host config file [changePHP]"]
|
return [0, str(msg) + " [IO Error with per host config file [changePHP]"]
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
if not os.path.exists(vhost.redisConf):
|
||||||
data = open(vhFile, "r").readlines()
|
data = open(vhFile, "r").readlines()
|
||||||
|
|
||||||
php = PHPManager.getPHPString(phpVersion)
|
php = PHPManager.getPHPString(phpVersion)
|
||||||
@@ -598,6 +599,16 @@ class vhost:
|
|||||||
os.remove(phpDetachUpdatePath)
|
os.remove(phpDetachUpdatePath)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
command = 'redis-cli get "vhost:%s"' % (vhFile.split('/')[-2])
|
||||||
|
configData = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
|
import re
|
||||||
|
configData = re.sub(r'"phpVersion": .*,', '"phpVersion": %s,' % (phpVersion.lstrip('PHP ')), configData)
|
||||||
|
|
||||||
|
command = "redis-cli set vhost:%s '%s'" % (vhFile.split('/')[-2], configData)
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
|
||||||
print("1,None")
|
print("1,None")
|
||||||
return 1, 'None'
|
return 1, 'None'
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ from plogical.cronUtil import CronUtil
|
|||||||
from re import match,I,M
|
from re import match,I,M
|
||||||
from plogical import randomPassword
|
from plogical import randomPassword
|
||||||
from .StagingSetup import StagingSetup
|
from .StagingSetup import StagingSetup
|
||||||
from plogical.vhost import vhost
|
|
||||||
|
|
||||||
|
|
||||||
class WebsiteManager:
|
class WebsiteManager:
|
||||||
|
|||||||
Reference in New Issue
Block a user