From 62de427d39fc094d9610aaf5f9eeaa9b0ad0a304 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 26 Sep 2020 18:45:56 +0800 Subject: [PATCH] Update install.sh --- plugins/php/versions/52/install.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 468d272cc..6d9d76e88 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -21,12 +21,28 @@ mkdir -p $sourcePath/php mkdir -p $serverPath/php if [ ! -d $sourcePath/php/php${PHP_VER} ];then - if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then - wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz + if [ ! -f $sourcePath/php/php-${version}.tar.gz ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz http://au1.php.net/distributions/php-${version}.tar.gz fi - cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz + if [ ! -f $sourcePath/php/php-5.2.17-fpm-0.5.14.diff.gz ]; then + wget -O $sourcePath/php/php-5.2.17-fpm-0.5.14.diff.gz http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz + fi + + + if [ ! -f $sourcePath/php/php-5.2.17-max-input-vars.patch ]; then + wget -O $sourcePath/php/php-5.2.17-max-input-vars.patch https://raw.github.com/laruence/laruence.github.com/master/php-5.2-max-input-vars/php-5.2.17-max-input-vars.patch + fi + + + cd $sourcePath/php && tar -zxvf $sourcePath/php/php-${version}.tar.xz mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} + + + cd $sourcePath/php + gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php${PHP_VER} -p1 + cd $sourcePath/php/php${PHP_M_VER} + patch -p1 < ../php-5.2.17-max-input-vars.patch fi