diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index f74c9cd73..34d0264d1 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -234,7 +234,7 @@ class ApplicationInstaller(multi.Thread): 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) diff --git a/plogical/phpUtilities.py b/plogical/phpUtilities.py index 0518c6f5d..fd56ff7ba 100755 --- a/plogical/phpUtilities.py +++ b/plogical/phpUtilities.py @@ -219,6 +219,20 @@ class phpUtilities: @staticmethod 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' if os.path.exists(finalConfPath): command = f'grep -Eo -m 1 "php[0-9]+" {finalConfPath} | sed -n "1p"' diff --git a/plogical/test.py b/plogical/test.py index e69de29bb..8b1378917 100644 --- a/plogical/test.py +++ b/plogical/test.py @@ -0,0 +1 @@ +