From e5d313ad65f16021a95664a0a9206f8a73b85945 Mon Sep 17 00:00:00 2001 From: lipido Date: Fri, 4 Oct 2019 08:50:33 +0200 Subject: [PATCH] Fixes php.ini editions upon container start This commit adapts the run.sh to the new version of the mattrayner/lamp:latest-1604 image that has updated PHP to version 7, breaking the php.ini edition in the run.sh. --- run.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 2df107a..fb89d95 100755 --- a/run.sh +++ b/run.sh @@ -2,9 +2,17 @@ VOLUME_HOME="/var/lib/mysql" -sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \ +for php_config_dir in /etc/php/*; do + php_ini=$php_config_dir/apache2/php.ini + + if [ -f "$php_ini" ]; then + sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \ -e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" \ - -e "s/^display_errors.*/display_errors = ${PHP_DISPLAY_ERRORS}/" /etc/php/5.6/apache2/php.ini + -e "s/^display_errors.*/display_errors = ${PHP_DISPLAY_ERRORS}/" $php_ini + fi +done + + sed -i "s/export APACHE_RUN_GROUP=www-data/export APACHE_RUN_GROUP=staff/" /etc/apache2/envvars -- 2.18.1