File tree Expand file tree Collapse file tree 9 files changed +33
-18
lines changed Expand file tree Collapse file tree 9 files changed +33
-18
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ for ext in */; do \
88 if compgen -G " /etc/php/${PHP_VERSION} /cli/conf.d/*-$ext_no_slash .ini" > /dev/null; then
99 echo " ***************** Disabling $ext_no_slash ******************"
1010 # rm -f /etc/php/${PHP_VERSION}/cli/conf.d/*-$ext_no_slash.ini
11- phpdismod $ext_no_slash
11+ phpdismod -v $PHP_VERSION $ext_no_slash
1212 fi
1313done
Original file line number Diff line number Diff line change 5454
5555if [ -n " $EXTENSION " ]; then
5656 # Let's perform a test
57- phpenmod $EXTENSION
57+ phpenmod -v $PHP_VERSION $EXTENSION
5858 /usr/bin/real_php -m | grep " ${PHP_EXT_PHP_NAME:- ${PHP_EXT_NAME:- $EXTENSION } } "
5959 # Check that there is no output on STDERR when starting php:
6060 OUTPUT=` /usr/bin/real_php -r " echo '';" 2>&1 `
6161 [[ " $OUTPUT " == " " ]]
6262 # And now, let's disable it!
63- phpdismod $EXTENSION
63+ phpdismod -v $PHP_VERSION $EXTENSION
6464fi
6565
6666if [ -n " $PECL_EXTENSION " ]; then
6767 # Let's perform a test
68- PHP_EXTENSIONS=" ${PHP_EXT_NAME:- $PECL_EXTENSION } " /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash
68+ PHP_EXTENSIONS=" ${PHP_EXT_NAME:- $PECL_EXTENSION } " PHP_VERSION= " ${PHP_VERSION} " /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash
6969 PHP_EXTENSIONS=" ${PHP_EXT_NAME:- $PECL_EXTENSION } " /usr/bin/real_php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION} /cli/conf.d/testextension.ini
7070
7171 /usr/bin/real_php -m | grep " ${PHP_EXT_PHP_NAME:- ${PHP_EXT_NAME:- $PECL_EXTENSION } } "
7272 # Check that there is no output on STDERR when starting php:
7373 OUTPUT=` /usr/bin/real_php -r " echo '';" 2>&1 `
7474 [[ " $OUTPUT " == " " ]]
75- PHP_EXTENSIONS=" " /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash
75+ PHP_EXTENSIONS=" " PHP_VERSION= " ${PHP_VERSION} " /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash
7676 rm /etc/php/${PHP_VERSION} /cli/conf.d/testextension.ini
7777fi
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33set -e
4- export DEPENDENCIES=" php-igbinary php-msgpack"
4+ export DEPENDENCIES=" php${PHP_VERSION} -igbinary php${PHP_VERSION} -msgpack"
55export EXTENSION=memcached
66
77# we need to do some weird stuff to get memcached working
8- phpdismod igbinary
9- phpenmod igbinary
8+ phpdismod -v $PHP_VERSION igbinary
9+ phpenmod -v $PHP_VERSION igbinary
1010
1111../docker-install.sh
1212
13- phpdismod igbinary
13+ phpdismod -v $PHP_VERSION igbinary
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ export PACKAGE_NAME=mysql
77../docker-install.sh
88
99# Exception for this package that enables both mysqlnd and mysqli and pdo_mysql
10- phpdismod mysqli
11- phpdismod pdo_mysql
10+ phpdismod -v $PHP_VERSION mysqli
11+ phpdismod -v $PHP_VERSION pdo_mysql
Original file line number Diff line number Diff line change 44export EXTENSION=redis
55
66# we need to do some weird stuff to get memcached working
7- phpdismod igbinary
8- phpenmod igbinary
7+ phpdismod -v $PHP_VERSION igbinary
8+ phpenmod -v $PHP_VERSION igbinary
99
1010../docker-install.sh
1111
12- phpdismod igbinary
12+ phpdismod -v $PHP_VERSION igbinary
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ sudo chown docker:docker /opt/php_env_var_cache.php
120120/usr/bin/real_php /usr/local/bin/check_php_env_var_changes.php & > /dev/null
121121
122122/usr/bin/real_php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION} /mods-available/generated_conf.ini
123- /usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash
123+ PHP_VERSION= " ${PHP_VERSION} " /usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash
124124
125125# output on the logs can be done by writing on the "tini" PID. Useful for CRONTAB
126126TINI_PID=` ps -e | grep tini | awk ' {print $1;}' `
Original file line number Diff line number Diff line change 1212
1313if [[ " $REGENERATE " == " 1" ]]; then
1414 /usr/bin/real_php /usr/local/bin/generate_conf.php | sudo tee " /etc/php/${PHP_VERSION} /mods-available/generated_conf.ini" > /dev/null
15- /usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash
15+ PHP_VERSION= " ${PHP_VERSION} " /usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash
1616fi
1717
1818exec /usr/bin/real_php " $@ "
Original file line number Diff line number Diff line change 1515
1616$ phpExtensions = getPhpExtensionsEnvVar ();
1717
18+ $ phpVersion = getPhpVersionEnvVar ();
19+
1820//foreach ($compiledExtensions as $phpExtension) {
1921// $envName = 'PHP_EXTENSION_'.strtoupper($phpExtension);
2022//
6668}*/
6769
6870if ($ toDisable ) {
69- echo 'phpdismod ' . implode (' ' , $ toDisable )."\n" ;
71+ echo 'phpdismod -v ' . $ phpVersion . ' ' . implode (' ' , $ toDisable )."\n" ;
7072}
7173if ($ toEnable ) {
72- echo 'phpenmod ' . implode (' ' , $ toEnable )."\n" ;
74+ echo 'phpenmod -v ' . $ phpVersion . ' ' . implode (' ' , $ toEnable )."\n" ;
7375}
Original file line number Diff line number Diff line change @@ -73,6 +73,19 @@ function getPhpExtensionsEnvVar(): array
7373 return $ phpExtensions ;
7474}
7575
76+ function getPhpVersionEnvVar ()
77+ {
78+ static $ phpVersion = null ;
79+ if ($ phpVersion !== null ) {
80+ return $ phpVersion ;
81+ }
82+
83+ $ phpVersion = getenv ('PHP_VERSION ' );
84+
85+ return $ phpVersion ;
86+ }
87+
88+
7689function enableExtension (string $ extensionName ): bool {
7790 $ phpExtensions = getPhpExtensionsEnvVar ();
7891
You can’t perform that action at this time.
0 commit comments