-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-apachephp.sh
28 lines (22 loc) · 951 Bytes
/
setup-apachephp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env sh
set -e
set -x
HELPERSPATH="/helpers"
#${HELPERSPATH}/apt-retry-install.sh php-fpm
#/usr/sbin/a2enmod proxy_fcgi
#/usr/sbin/a2enmod setenvif
#PHPCONF=$(for item in $(ls /etc/apache2/conf-available/php*-fpm.conf) ; do basename $item ; done | sort --version-sort | tail -n 1)
#[ "$PHPCONF" != "" ]
#/usr/sbin/a2enconf $(echo $PHPCONF | rev | cut -c6- | rev)
${HELPERSPATH}/apt-retry-install.sh php
/usr/bin/php -v
PHPMODULE=$(for item in $(ls /etc/apache2/mods-available/php*.load) ; do basename $item ; done | sort --version-sort | tail -n 1)
[ "$PHPMODULE" != "" ]
/usr/sbin/a2enmod $(echo $PHPMODULE | rev | cut -c6- | rev)
${HELPERSPATH}/apt-retry-install.sh php-sqlite3
${HELPERSPATH}/apt-retry-install.sh php-gd
/usr/bin/php -m
PHPVERSION=$(echo $PHPMODULE | rev | cut -c6- | rev | cut -c4-)
if [ "$PHPVERSION" = "8.4" ] ; then
echo "zend.max_allowed_stack_size = -1" > /etc/php/$PHPVERSION/apache2/conf.d/99-stack.ini
fi