Skip to content

Commit c9b9271

Browse files
authored
Fix installing swoole on PHP 5 when libpcre is installed (#1283)
1 parent 41171ef commit c9b9271

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

install-php-extensions

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4558,7 +4558,12 @@ installRemoteModule() {
45584558
elif test $PHP_MAJMIN_VERSION -le 504; then
45594559
installRemoteModule_version=2.0.4
45604560
elif test $PHP_MAJMIN_VERSION -le 506; then
4561-
installRemoteModule_version=2.0.11
4561+
# Using 2.0.11 when libpcre-dev is installed causes a Segmentation fault in php 5 (see https://github.com/mlocati/docker-php-extension-installer/issues/1282)
4562+
if test "$DISTRO" = debian && { dpkg -l 'libpcre*-dev' 2>/dev/null | grep -Eq '^ii'; }; then
4563+
installRemoteModule_version=2.0.10
4564+
else
4565+
installRemoteModule_version=2.0.11
4566+
fi
45624567
elif test $PHP_MAJMIN_VERSION -le 700; then
45634568
installRemoteModule_version=4.3.6
45644569
elif test $PHP_MAJMIN_VERSION -le 701; then

0 commit comments

Comments
 (0)