diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 6c7c38d5..8877f722 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -357,7 +357,7 @@ add_composertool() { # Function to get PHP version in semver format. php_semver() { - php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+([0-9]+)?)?" | head -n 1 + php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+((-?[a-zA-Z]+([0-9]+)?)?){2}" | head -n 1 } # Function to get the tag for a php version. diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 99f8f5e9..3f92c156 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -207,6 +207,7 @@ setup_php() { scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||") ini_dir=$(php --ini | grep "(php.ini)" | sed -e "s|.*: s*||") pecl_file="$scan_dir"/99-pecl.ini + export ext_dir mapfile -t ini_file < <(sudo find "$ini_dir/.." -name "php.ini" -exec readlink -m {} +) link_pecl_file configure_php