diff --git a/misc/tools.func b/misc/tools.func index 54773b30..df5934cc 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -465,8 +465,10 @@ function setup_php() { fi if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then - if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then - $STD a2dismod php"${CURRENT_PHP}" || true + if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then + if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then + $STD a2dismod php"${CURRENT_PHP}" || true + fi fi fi