update PHP 7.1 support

This commit is contained in:
Teddysun
2016-12-22 11:19:11 +09:00
committed by GitHub
parent f3af5119ba
commit 7fb294db13

View File

@@ -26,6 +26,8 @@ upgrade_php(){
latest_php=$(curl -s http://php.net/downloads.php | awk '/Changelog/{print $2}' | grep '5.6')
elif [ "${php_version}" == "7.0" ];then
latest_php=$(curl -s http://php.net/downloads.php | awk '/Changelog/{print $2}' | grep '7.0')
elif [ "${php_version}" == "7.1" ];then
latest_php=$(curl -s http://php.net/downloads.php | awk '/Changelog/{print $2}' | grep '7.1')
fi
echo -e "Latest version of PHP: \033[41;37m ${latest_php} \033[0m"
@@ -84,19 +86,19 @@ upgrade_php(){
with_mysql=""
if [ -d ${mariadb_location} ]; then
if [ "${php_version}" == "7.0" ];then
if [[ "${php_version}" == "7.0" || "${php_version}" == "7.1" ]]; then
with_mysql="--with-mysqli=${mariadb_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
else
with_mysql="--with-mysql=${mariadb_location} --with-mysqli=${mariadb_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
fi
elif [ -d ${mysql_location} ]; then
if [ "${php_version}" == "7.0" ];then
if [[ "${php_version}" == "7.0" || "${php_version}" == "7.1" ]]; then
with_mysql="--with-mysqli=${mysql_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
else
with_mysql="--with-mysql=${mysql_location} --with-mysqli=${mysql_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
fi
elif [ -d ${percona_location} ]; then
if [ "${php_version}" == "7.0" ];then
if [[ "${php_version}" == "7.0" || "${php_version}" == "7.1" ]]; then
with_mysql="--with-mysqli=${percona_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
else
with_mysql="--with-mysql=${percona_location} --with-mysqli=${percona_location}/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock"
@@ -104,14 +106,11 @@ upgrade_php(){
fi
enable_opcache=""
if [[ "${php_version}" == "5.5" || "${php_version}" == "5.6" || "${php_version}" == "7.0" ]]; then
enable_opcache="--enable-opcache"
fi
with_gmp="--with-gmp"
with_icu_dir="--with-icu-dir=/usr"
if centosversion 5; then
if [[ "${php_version}" == "5.5" || "${php_version}" == "5.6" || "${php_version}" == "7.0" ]];then
if [[ "${php_version}" == "5.5" || "${php_version}" == "5.6" || "${php_version}" == "7.0" || "${php_version}" == "7.1" ]]; then
enable_opcache="--enable-opcache"
if centosversion 5; then
with_gmp="--with-gmp=/usr/local"
with_icu_dir="--with-icu-dir=/usr/local"
fi