Skip to content

Commit 4e6a29d

Browse files
mdt-36253: Setup php-spx. (#12)
1 parent 6aece42 commit 4e6a29d

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

assets/lando/setup_php_spx.sh

+9-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11
#!/usr/bin/env bash
22

3-
# Check if PHP_SPX environment variable exists and if its value is 1
4-
if [ "${PHP_SPX}" = "1" ]; then
5-
apt-get install zlib1g-dev
6-
cd ~
7-
git clone https://github.com/NoiseByNorthwest/php-spx.git
8-
cd php-spx
9-
git checkout release/latest
10-
phpize
11-
./configure
12-
make
13-
make install
14-
docker-php-ext-enable spx
15-
# Configure default configuration for SPX
16-
SPX_INI="/usr/local/etc/php/conf.d/docker-php-ext-spx.ini"
17-
{
18-
echo "extension=spx.so"
19-
echo "spx.http_enabled=1"
20-
echo "spx.http_key=\"dev\""
21-
echo "spx.http_ip_whitelist=\"*\""
22-
echo "spx.http_trusted_proxies=\"*\""
23-
} | tee ${SPX_INI}
24-
/etc/init.d/apache2 reload
25-
else
26-
echo "PHP_SPX is not set to 1 or not present. Skipping SPX installation."
27-
fi
3+
apt-get install zlib1g-dev
4+
cd ~
5+
git clone https://github.com/NoiseByNorthwest/php-spx.git
6+
cd php-spx
7+
git checkout release/latest
8+
phpize
9+
./configure
10+
make
11+
make install

0 commit comments

Comments
 (0)