From 92c7e88a17581c73da30abb7cb715805b8032ca9 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 10 Aug 2023 19:39:18 +0500 Subject: [PATCH] update static file cache --- .../templates/baseTemplate/index.html | 2 +- plogical/applicationInstaller.py | 30 +++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 6d062bd32..bf51910ee 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -77,7 +77,7 @@ - {% with version="2.3.4.3" %} + {% with version="2.3.4.5" %} diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 5a68bfa42..6a2dcb626 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -548,6 +548,32 @@ $parameters = array( statusFile.writelines('Setting up paths,0') statusFile.close() + #### Before installing wordpress change php to 8.0 + + from plogical.virtualHostUtilities import virtualHostUtilities + + completePathToConfigFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf' + + execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py" + execPath = execPath + " changePHP --phpVersion 'PHP 8.0' --path " + completePathToConfigFile + ProcessUtilities.executioner(execPath) + + ### lets first find php path + + from plogical.phpUtilities import phpUtilities + + vhFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf' + + phpPath = phpUtilities.GetPHPVersionFromFile(vhFile) + + ### basically for now php 8.0 is being checked + + if not os.path.exists(phpPath): + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('PHP 8.0 missing installing now..,20') + statusFile.close() + phpUtilities.InstallSaidPHP('80') + finalPath = '' self.permPath = '' @@ -604,8 +630,8 @@ $parameters = array( dbName, dbUser, dbPassword = self.dbCreation(tempStatusPath, website) self.permPath = '/home/%s/public_html' % (website.domain) - php = PHPManager.getPHPString(website.phpSelection) - FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) + #php = PHPManager.getPHPString(website.phpSelection) + FinalPHPPath = phpPath ## Security Check