diff --git a/plugins/php/install.sh b/plugins/php/install.sh index 692b6acb5..16f66fbe8 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -63,7 +63,7 @@ if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then # cd /www/server/mdserver-web/plugins/php/versions/common && bash intl.sh install 73 # cd /www/server/mdserver-web/plugins/php/versions/common && bash gd.sh install 56 # cd /www/server/mdserver-web/plugins/php/versions/common && bash openssl.sh install 56 - # cd /www/server/mdserver-web/plugins/php/versions/common && bash sodium.sh install 81 + # cd /www/server/mdserver-web/plugins/php/versions/common && bash fileinfo.sh install 81 cd ${rootPath}/plugins/php/versions/common && bash gd.sh install ${type} cd ${rootPath}/plugins/php/versions/common && bash iconv.sh install ${type} cd ${rootPath}/plugins/php/versions/common && bash exif.sh install ${type} diff --git a/plugins/php/versions/common/fileinfo.sh b/plugins/php/versions/common/fileinfo.sh index 4e7871c90..e0a481d17 100755 --- a/plugins/php/versions/common/fileinfo.sh +++ b/plugins/php/versions/common/fileinfo.sh @@ -37,6 +37,8 @@ else BAK='' fi +OSNAME=`cat ${rootPath}/data/osname.pl` + Install_lib() { @@ -59,6 +61,7 @@ Install_lib() OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi + $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS @@ -66,7 +69,6 @@ Install_lib() # It is considered as a temporary bug if [ "$version" == "81" ] || [ "$version" == "82" ];then bash ${rootPath}/scripts/getos.sh - OSNAME=`cat ${rootPath}/data/osname.pl` if [ "$OSNAME" == 'centos' ];then FILE_softmagic=$sourcePath/php${version}/ext/${LIBNAME}/libmagic/softmagic.c FIND_UNDEF_STRNDUP=`cat $FILE_softmagic|grep '#undef strndup'` @@ -81,6 +83,11 @@ Install_lib() sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=gnu99/g' Makefile fi + if [ "$version" -gt "80" ] && [ "$OSNAME" == 'centos' ];then + sed -i $BAK "s#CFLAGS = -g -O2#CFLAGS = -std=c99 -g#g" $sourcePath/php${version}/ext/${LIBNAME}/Makefile + fi + + make clean && make && make install && make clean if [ -d $sourcePath/php${version} ];then