From fb187cc1c9845b767835ebb7c94690fc7de3d792 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Fri, 28 Apr 2023 13:53:54 +0500 Subject: [PATCH] bu fix: wp manager version fetch --- websiteFunctions/website.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 43e8551d5..d0ea215b2 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -996,8 +996,8 @@ class WebsiteManager: php = PHPManager.getPHPString(wpsite.owner.phpSelection) FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) - command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get DB_NAME --skip-plugins --skip-themes --path={wpsite.path}' - retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, None, None, 1) + command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get DB_NAME --skip-plugins --skip-themes --path={wpsite.path} 2>/dev/null' + retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, True, None, 1) if stdoutput.find('Error:') == -1: DataBaseName = stdoutput.rstrip("\n") @@ -1007,8 +1007,8 @@ class WebsiteManager: json_data = json.dumps(data_ret) return HttpResponse(json_data) - command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get DB_USER --skip-plugins --skip-themes --path={wpsite.path}' - retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, None, None, 1) + command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get DB_USER --skip-plugins --skip-themes --path={wpsite.path} 2>/dev/null' + retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, True, None, 1) if stdoutput.find('Error:') == -1: DataBaseUser = stdoutput.rstrip("\n") @@ -1018,8 +1018,8 @@ class WebsiteManager: json_data = json.dumps(data_ret) return HttpResponse(json_data) - command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get table_prefix --skip-plugins --skip-themes --path={wpsite.path}' - retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, None, None, 1) + command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config get table_prefix --skip-plugins --skip-themes --path={wpsite.path} 2>/dev/null' + retStatus, stdoutput = ProcessUtilities.outputExecutioner(command, wpsite.owner.externalApp, True, None, 1) if stdoutput.find('Error:') == -1: tableprefix = stdoutput.rstrip("\n")