Switching master to PHP7

This commit is contained in:
Ric Harvey
2017-01-03 09:19:57 +00:00
parent 024ece2ce3
commit bc75013ac4
8 changed files with 73 additions and 64 deletions

View File

@@ -13,10 +13,10 @@ fi
# Set custom webroot
if [ ! -z "$WEBROOT" ]; then
webroot=$WEBROOT
sed -i "s#root /var/www/html;#root ${webroot};#g" /etc/nginx/sites-available/default.conf
webroot=$WEBROOT
sed -i "s#root /var/www/html;#root ${webroot};#g" /etc/nginx/sites-available/default.conf
else
webroot=/var/www/html
webroot=/var/www/html
fi
# Setup git variables
@@ -62,31 +62,31 @@ fi
# Display PHP error's or not
if [[ "$ERRORS" != "1" ]] ; then
echo php_flag[display_errors] = off >> /etc/php5/php-fpm.conf
echo php_flag[display_errors] = off >> /etc/php7/php-fpm.conf
else
echo php_flag[display_errors] = on >> /etc/php5/php-fpm.conf
echo php_flag[display_errors] = on >> /etc/php7/php-fpm.conf
fi
# Display Version Details or not
if [[ "$HIDE_NGINX_HEADERS" == "0" ]] ; then
sed -i "s/server_tokens off;/server_tokens on;/g" /etc/nginx/nginx.conf
else
sed -i "s/expose_php = On/expose_php = Off/g" /etc/php5/conf.d/php.ini
sed -i "s/expose_php = On/expose_php = Off/g" /etc/php7/conf.d/php.ini
fi
# Increase the memory_limit
if [ ! -z "$PHP_MEM_LIMIT" ]; then
sed -i "s/memory_limit = 128M/memory_limit = ${PHP_MEM_LIMIT}M/g" /etc/php5/conf.d/php.ini
sed -i "s/memory_limit = 128M/memory_limit = ${PHP_MEM_LIMIT}M/g" /etc/php7/conf.d/php.ini
fi
# Increase the post_max_size
if [ ! -z "$PHP_POST_MAX_SIZE" ]; then
sed -i "s/post_max_size = 100M/post_max_size = ${PHP_POST_MAX_SIZE}M/g" /etc/php5/conf.d/php.ini
sed -i "s/post_max_size = 100M/post_max_size = ${PHP_POST_MAX_SIZE}M/g" /etc/php7/conf.d/php.ini
fi
# Increase the upload_max_filesize
if [ ! -z "$PHP_UPLOAD_MAX_FILESIZE" ]; then
sed -i "s/upload_max_filesize = 100M/upload_max_filesize= ${PHP_UPLOAD_MAX_FILESIZE}M/g" /etc/php5/conf.d/php.ini
sed -i "s/upload_max_filesize = 100M/upload_max_filesize= ${PHP_UPLOAD_MAX_FILESIZE}M/g" /etc/php7/conf.d/php.ini
fi
# Always chown webroot for better mounting