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.
parent c9bfe017
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment