Switch to php7.0
This commit is contained in:
parent
2c8a73444d
commit
cce6819594
@ -4,8 +4,8 @@ VARGANTDEV=1
|
|||||||
DIR=/vagrant
|
DIR=/vagrant
|
||||||
DIRDATA=$DIR/data
|
DIRDATA=$DIR/data
|
||||||
MYSQL_PASS=scores
|
MYSQL_PASS=scores
|
||||||
MARIADB_VERSION="10.1"
|
MARIADB_VERSION="10.1"
|
||||||
PHPMYADMIN_VERSION="4.6.3"
|
PHPMYADMIN_VERSION="4.6.3"
|
||||||
|
|
||||||
# --- Add a file action.upgrade to perfom a system upgrade
|
# --- Add a file action.upgrade to perfom a system upgrade
|
||||||
if [ -f $DIR/action.upgrade ]
|
if [ -f $DIR/action.upgrade ]
|
||||||
@ -61,10 +61,10 @@ if [ ! -f /usr/bin/php5 ]
|
|||||||
then
|
then
|
||||||
# Install
|
# Install
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install htop unzip apache2 php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
|
sudo apt-get -y install htop unzip apache2 php7.0-fpm php7.0-cli php7.0-apcu php7.0-curl php7.0-xmlrpc php7.0-xsl php7.0-mysql
|
||||||
if [ $VARGANTDEV -eq 1 ]
|
if [ $VARGANTDEV -eq 1 ]
|
||||||
then
|
then
|
||||||
sudo apt-get -y install php5-xdebug
|
sudo apt-get -y install php-xdebug
|
||||||
fi
|
fi
|
||||||
sudo a2enmod autoindex deflate expires headers rewrite actions proxy proxy_fcgi
|
sudo a2enmod autoindex deflate expires headers rewrite actions proxy proxy_fcgi
|
||||||
sudo cp -f $DIRDATA/Apache/phpfcgi.conf /etc/apache2/conf-available/phpfcgi.conf
|
sudo cp -f $DIRDATA/Apache/phpfcgi.conf /etc/apache2/conf-available/phpfcgi.conf
|
||||||
@ -73,27 +73,27 @@ then
|
|||||||
# --- Configuration PHP / CLI
|
# --- Configuration PHP / CLI
|
||||||
if [ -f /etc/php5/cli/php.ini ]
|
if [ -f /etc/php5/cli/php.ini ]
|
||||||
then
|
then
|
||||||
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/cli/php.ini
|
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php7.0/cli/php.ini
|
||||||
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php5/cli/php.ini
|
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php7.0/cli/php.ini
|
||||||
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cli/php.ini
|
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php7.0/cli/php.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Configuration PHP FPM
|
# --- Configuration PHP FPM
|
||||||
if [ -f /etc/php5/fpm/php.ini ]
|
if [ -f /etc/php5/fpm/php.ini ]
|
||||||
then
|
then
|
||||||
sudo sed -i -e 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php7.0/fpm/php.ini
|
||||||
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php7.0/mods-available/xdebug.ini
|
||||||
|
|
||||||
# --- Browscap
|
# --- Browscap
|
||||||
sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php5/fpm/
|
sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php7.0/fpm/
|
||||||
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/fpm\/php_browscap.ini/g' /etc/php5/fpm/php.ini
|
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/fpm\/php_browscap.ini/g' /etc/php7.0/fpm/php.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- ChartDirector
|
# --- ChartDirector
|
||||||
@ -153,8 +153,8 @@ for f in *.conf; do
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
# --- phpmyadmin.sd.dev
|
# --- phpmyadmin.sd.dev
|
||||||
cp -f $DIRDATA/Apache/phpmyadmin.conf $DIR/vhosts/phpmyadmin.conf
|
cp -f $DIRDATA/Apache/phpmyadmin.conf $DIR/vhosts/phpmyadmin.conf
|
||||||
sed -i -e "s/VERSION/$PHPMYADMIN_VERSION/" $DIR/vhosts/phpmyadmin.conf
|
sed -i -e "s/VERSION/$PHPMYADMIN_VERSION/" $DIR/vhosts/phpmyadmin.conf
|
||||||
|
|
||||||
# --- test.sd.dev
|
# --- test.sd.dev
|
||||||
cp -f $DIRDATA/Apache/test.conf $DIR/vhosts/test.conf
|
cp -f $DIRDATA/Apache/test.conf $DIR/vhosts/test.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user