mautic version 5 and php 8.1 support

This commit is contained in:
usmannasir
2024-01-16 15:05:46 +05:00
parent 6ee19f0001
commit 84e3569a0d
3 changed files with 16 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ class ApplicationInstaller(multi.Thread):
finalURL = domainName finalURL = domainName
command = f"{phpPath} bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f" command = f"{phpPath} -d memory_limit=256M bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f"
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath) result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)

View File

@@ -219,6 +219,20 @@ class phpUtilities:
@staticmethod @staticmethod
def GetPHPVersionFromFile(vhFile, domainName=None): def GetPHPVersionFromFile(vhFile, domainName=None):
if domainName == None:
# Your file path
file_path = "/usr/local/lsws/conf/vhosts/mautic.wpmautic.net/vhost.conf"
# Split the path by '/'
path_parts = file_path.split('/')
# Find the index of 'vhosts' in the path
vhosts_index = path_parts.index('vhosts')
# Extract the domain
domainName = path_parts[vhosts_index + 1]
finalConfPath = ApacheVhost.configBasePath + domainName + '.conf' finalConfPath = ApacheVhost.configBasePath + domainName + '.conf'
if os.path.exists(finalConfPath): if os.path.exists(finalConfPath):
command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"' command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"'

View File

@@ -0,0 +1 @@