File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1+ . /etc/os-release
12[ " ${BUILDS:? } " = " debug" ] && PHP_PKG_SUFFIX=-dbgsym
23cp /var/lib/dpkg/status /var/lib/dpkg/status-orig
34DEBIAN_FRONTEND=noninteractive apt-get install -f
5+
6+ enable_pecl_extension () {
7+ local extension=$1
8+ sudo curl -o /etc/php/" $PHP_VERSION " /mods-available/" $extension " .ini -sL https://raw.githubusercontent.com/shivammathur/php-builder/main/config/modules/" $extension " .ini
9+ phpenmod -v " $PHP_VERSION " " $extension "
10+ }
11+
412echo " Installing PHP $PHP_VERSION "
513
614DEBIAN_FRONTEND=noninteractive apt-fast install -y --no-install-recommends \
@@ -141,11 +149,19 @@ for extension in sqlsrv pdo_sqlsrv; do
141149 sudo pecl install -f " $extension "
142150 fi
143151 if [[ $PHP_VERSION =~ 7.[0-4]| 8.[0-2] ]]; then
144- sudo curl -o /etc/php/" $PHP_VERSION " /mods-available/" $extension " .ini -sL https://raw.githubusercontent.com/shivammathur/php-builder/main/config/modules/" $extension " .ini
145- phpenmod -v " $PHP_VERSION " " $extension "
152+ enable_pecl_extension " $extension "
146153 fi
147154done
148155
156+ if [ " $PHP_VERSION " = " 5.6" ]; then
157+ if [[ " $VERSION_ID " = " 18.04" || " $VERSION_ID " = " 20.04" ]]; then
158+ DEBIAN_FRONTEND=noninteractive apt-fast install -y --no-install-recommends php$PHP_VERSION -mongo
159+ else
160+ sudo pecl install -f mongo
161+ enable_pecl_extension mongo
162+ fi
163+ fi
164+
149165sudo rm -rf /var/cache/apt/archives/* .deb || true
150166sudo rm -rf /var/cache/apt/archives/* .ddeb || true
151167
You can’t perform that action at this time.
0 commit comments