mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
fixed php config path for ubuntu
This commit is contained in:
@@ -187,30 +187,30 @@ class preFlightsChecks:
|
|||||||
preFlightsChecks.stdOut("CyberPanel user added!")
|
preFlightsChecks.stdOut("CyberPanel user added!")
|
||||||
break
|
break
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
while (1):
|
while (1):
|
||||||
|
|
||||||
command = "usermod -aG wheel cyberpanel"
|
command = "usermod -aG wheel cyberpanel"
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
res = subprocess.call(cmd)
|
res = subprocess.call(cmd)
|
||||||
|
|
||||||
if preFlightsChecks.resFailed(self.distro, res):
|
if preFlightsChecks.resFailed(self.distro, res):
|
||||||
count = count + 1
|
count = count + 1
|
||||||
preFlightsChecks.stdOut(
|
preFlightsChecks.stdOut(
|
||||||
"We are trying to add CyberPanel user to SUDO group, trying again, try number: " + str(
|
"We are trying to add CyberPanel user to SUDO group, trying again, try number: " + str(
|
||||||
count) + "\n")
|
count) + "\n")
|
||||||
if count == 3:
|
if count == 3:
|
||||||
logging.InstallLog.writeToFile(
|
logging.InstallLog.writeToFile(
|
||||||
"Not able to add user CyberPanel to SUDO group, exiting the installer. [setup_account_cyberpanel]")
|
"Not able to add user CyberPanel to SUDO group, exiting the installer. [setup_account_cyberpanel]")
|
||||||
preFlightsChecks.stdOut("Installation failed, consult: /var/log/installLogs.txt")
|
preFlightsChecks.stdOut("Installation failed, consult: /var/log/installLogs.txt")
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
else:
|
else:
|
||||||
logging.InstallLog.writeToFile("CyberPanel user was successfully added to SUDO group!")
|
logging.InstallLog.writeToFile("CyberPanel user was successfully added to SUDO group!")
|
||||||
preFlightsChecks.stdOut("CyberPanel user was successfully added to SUDO group!")
|
preFlightsChecks.stdOut("CyberPanel user was successfully added to SUDO group!")
|
||||||
break
|
break
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
|
|||||||
@@ -1427,7 +1427,14 @@ def getCurrentPHPConfig(request):
|
|||||||
elif phpVers == "PHP 7.2":
|
elif phpVers == "PHP 7.2":
|
||||||
phpVers = "php72"
|
phpVers = "php72"
|
||||||
|
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
if ProcessUtilities.decideServer() == ProcessUtilities.centos:
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
|
else:
|
||||||
|
initial = phpVers[3]
|
||||||
|
final = phpVers[4]
|
||||||
|
|
||||||
|
completeName = str(initial) + '.' + str(final)
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
||||||
|
|
||||||
allow_url_fopen = "0"
|
allow_url_fopen = "0"
|
||||||
display_errors = "0"
|
display_errors = "0"
|
||||||
@@ -1605,7 +1612,14 @@ def getCurrentAdvancedPHPConfig(request):
|
|||||||
elif phpVers == "PHP 7.2":
|
elif phpVers == "PHP 7.2":
|
||||||
phpVers = "php72"
|
phpVers = "php72"
|
||||||
|
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
if ProcessUtilities.decideServer() == ProcessUtilities.centos:
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
|
else:
|
||||||
|
initial = phpVers[3]
|
||||||
|
final = phpVers[4]
|
||||||
|
|
||||||
|
completeName = str(initial) + '.' + str(final)
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
||||||
|
|
||||||
configData = open(path, "r").read()
|
configData = open(path, "r").read()
|
||||||
|
|
||||||
@@ -1651,7 +1665,14 @@ def savePHPConfigAdvance(request):
|
|||||||
elif phpVers == "PHP 7.2":
|
elif phpVers == "PHP 7.2":
|
||||||
phpVers = "php72"
|
phpVers = "php72"
|
||||||
|
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
if ProcessUtilities.decideServer() == ProcessUtilities.centos:
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
|
else:
|
||||||
|
initial = phpVers[3]
|
||||||
|
final = phpVers[4]
|
||||||
|
|
||||||
|
completeName = str(initial) + '.' + str(final)
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
||||||
|
|
||||||
tempPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
tempPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,14 @@ class phpUtilities:
|
|||||||
def savePHPConfigBasic(phpVers,allow_url_fopen,display_errors,file_uploads,allow_url_include,memory_limit,max_execution_time,upload_max_filesize,max_input_time,post_max_size):
|
def savePHPConfigBasic(phpVers,allow_url_fopen,display_errors,file_uploads,allow_url_include,memory_limit,max_execution_time,upload_max_filesize,max_input_time,post_max_size):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
if ProcessUtilities.decideServer() == ProcessUtilities.centos:
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
|
else:
|
||||||
|
initial = phpVers[3]
|
||||||
|
final = phpVers[4]
|
||||||
|
|
||||||
|
completeName = str(initial) + '.' + str(final)
|
||||||
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
|
||||||
|
|
||||||
data = open(path, 'r').readlines()
|
data = open(path, 'r').readlines()
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1268,9 +1268,6 @@ app.controller('modifyACLCtrl', function($scope,$http) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
/* Java script code to create acl ends here */
|
/* Java script code to create acl ends here */
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user