From 3d794ddd93391621b62a074ad280d800f01d80b4 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 3 Apr 2023 01:18:19 +0530 Subject: [PATCH] Use phpenmod only for PHP 5.6 and above --- src/scripts/extensions/add_extensions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/extensions/add_extensions.sh b/src/scripts/extensions/add_extensions.sh index 3a3375a32..2d84e18ad 100644 --- a/src/scripts/extensions/add_extensions.sh +++ b/src/scripts/extensions/add_extensions.sh @@ -48,7 +48,7 @@ enable_extension() { [ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete enable_extension_dependencies "$1" "$2" enable_cache_extension_dependencies "$1" "$2" - if command -v phpenmod >/dev/null 2>&1; then + if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then mod="${ini_dir:?}"/../mods-available/"$1".ini [ -e "$mod" ] || (echo "; priority=${3:'20'}"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null sudo phpenmod -v "$version" "$1" >/dev/null 2>&1