From 8b0b4884a74f217136d46599735218e13a625003 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 Mar 2019 12:58:11 +0100 Subject: [PATCH] fix site function php73 install --- wo/cli/plugins/site_functions.py | 13 +++++++------ wo/cli/plugins/stack.py | 2 +- wo/core/variables.py | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index 43c376c..13965b2 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -712,13 +712,14 @@ def site_package_check(self, stype): if not self.app.pargs.php73 and stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']: Log.debug(self, "Setting apt_packages variable for PHP 7.2") - apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra + if not WOAptGet.is_installed(self, 'php7.2-fpm'): + apt_packages = apt_packages + WOVariables.wo_php - if self.app.pargs.php73 and stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']: - if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'): - Log.debug(self, "Setting apt_packages variable for PHP 7.3") - if not WOAptGet.is_installed(self, 'php7.3-fpm'): - apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra + if self.app.pargs.php73 and stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']: + if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'): + Log.debug(self, "Setting apt_packages variable for PHP 7.3") + if not WOAptGet.is_installed(self, 'php7.3-fpm'): + apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra else: Log.debug(self, "Setting apt_packages variable for PHP 7.3") if not WOAptGet.is_installed(self, 'php7.3-fpm'): diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 7ea9250..295f84d 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -637,7 +637,7 @@ class WOStackController(CementBaseController): "php73"): with open("/etc/nginx/conf.d/upstream.conf", "a") as php_file: php_file.write("upstream php73 {\nserver unix:/var/run/php/php73-fpm.sock;\n}\n" - "upstream debug73 {\nserver 127.0.0.1:9172;\n}\n") + "upstream debug73 {\nserver 127.0.0.1:9173;\n}\n") if set(WOVariables.wo_hhvm).issubset(set(apt_packages)): diff --git a/wo/core/variables.py b/wo/core/variables.py index e08bcc7..883546b 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -105,14 +105,14 @@ class WOVariables(): if (wo_platform_codename == 'trusty' or wo_platform_codename == 'xenial' or wo_platform_codename == 'bionic'): wo_php_repo = "ppa:ondrej/php" wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap", - "php7.2-readline", "php7.2-common", "php7.2-recode", - "php7.2-cli", "php7.2-mbstring", - "php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"] + "php7.2-readline", "php7.2-common", "php7.2-recode", + "php7.2-cli", "php7.2-mbstring", + "php7.2-bcmath", "php7.2-mysql", "php7.2-opcache", "php7.2-zip", "php7.2-xml", "php7.2-soap"] wo_php73 = ["php7.3-fpm", "php7.3-curl", "php7.3-gd", "php7.3-imap", "php7.3-readline", "php7.3-common", "php7.3-recode", "php7.3-cli", "php7.3-mbstring", "php7.3-bcmath", "php7.3-mysql", "php7.3-opcache", "php7.3-zip", "php7.3-xml", "php7.3-soap"] - wo_php_extra = ["php-memcached", "php-imagick", + wo_php_extra = ["php-memcached", "php-imagick", "memcached" "graphviz", "php-xdebug", "php-msgpack", "php-redis"] elif wo_platform_distro == 'debian': wo_php_repo = (