forked from bylexus/docker-apache-php7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
14 lines (12 loc) · 700 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -e
PHP_ERROR_REPORTING=${PHP_ERROR_REPORTING:-"E_ALL"}
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php/7.4/apache2/php.ini
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php/7.4/cli/php.ini
sed -ri "s/^error_reporting\s*=.*$//g" /etc/php/7.4/apache2/php.ini
sed -ri "s/^error_reporting\s*=.*$//g" /etc/php/7.4/cli/php.ini
echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php/7.4/apache2/php.ini
echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php/7.4/cli/php.ini
# Apache gets grumpy about PID files pre-existing, so remove them:
rm -f /var/run/apache2/apache2.pid
source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND