pull/109/head
Mr Chen 6 years ago
parent e580ba1901
commit b40cb7b4ea
  1. 5
      plugins/php/index.py
  2. 2
      plugins/php/js/php.js
  3. 92
      plugins/php/versions/53/apc.sh
  4. 1
      plugins/php/versions/53/install.sh
  5. 2
      plugins/php/versions/53/swoole.sh
  6. 17
      plugins/php/versions/53/zendguardloader.sh
  7. 2
      plugins/php/versions/demo.sh
  8. 15
      plugins/php/versions/phplib.conf

@ -570,11 +570,10 @@ def uninstallLib(version):
name + '.sh' + ' uninstall ' + version name + '.sh' + ' uninstall ' + version
data = public.execShell(execstr) data = public.execShell(execstr)
# print data if data[0] == '' and data[1] == '':
if data[0] == '':
return public.returnJson(True, '已经卸载成功!') return public.returnJson(True, '已经卸载成功!')
else: else:
return public.returnJson(False, '卸载出现错误信息!:' + data[0]) return public.returnJson(False, '卸载信息![通道0]:' + data[0] + "[通道0]:" + data[1])
if __name__ == "__main__": if __name__ == "__main__":

@ -529,7 +529,7 @@ function uninstallPHPLib(version, name, title, pathinfo) {
showMsg(rdata.msg, function(){ showMsg(rdata.msg, function(){
getTaskCount(); getTaskCount();
phpLibConfig(version); phpLibConfig(version);
},{ icon: rdata.status ? 1 : 2 }); },{ icon: rdata.status ? 1 : 2 },5000);
}); });
}); });

@ -0,0 +1,92 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=apc
LIBV=3.1.9
sysName=`uname`
actionType=$1
version=$2
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
if [ "${isInstall}" != "" ];then
echo "php$version 已安装${LIBNAME},请选择其它版本!"
return
fi
if [ ! -f "$extFile" ];then
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
_LIBNAME=$(echo $LIBNAME | tr '[a-z]' '[A-Z]')
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${_LIBNAME}-${LIBV}.tgz
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
cd ${LIBNAME}-${LIBV}
$serverPath/php/$version/bin/phpize
./configure --with-php-config=$serverPath/php/$version/bin/php-config
make && make install
cd $php_lib
rm -rf ${_LIBNAME}-${LIBV}
rm -rf ${_LIBNAME}-${LIBV}.tgz
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
echo "" >> $serverPath/php/$version/etc/php.ini
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
$serverPath/php/init.d/php$version reload
echo '==========================================================='
echo 'successful!'
}
Uninstall_lib()
{
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
echo "php-$version 未安装,请选择其它版本!"
return
fi
echo $extFile
if [ ! -f "$extFile" ];then
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
echo "php-$version not install ${LIBNAME}, Plese select other version!"
return
fi
sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
$serverPath/php/init.d/php$version reload
echo '==============================================='
echo 'successful!'
}
if [ "$actionType" == 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
Uninstall_lib
fi

@ -60,6 +60,7 @@ cd $sourcePath/php/php-5.3.29 && ./configure \
--enable-mbstring \ --enable-mbstring \
--enable-sysvshm \ --enable-sysvshm \
--enable-sysvmsg \ --enable-sysvmsg \
--enable-exif \
--enable-ftp \ --enable-ftp \
--enable-wddx \ --enable-wddx \
--enable-soap \ --enable-soap \

@ -84,7 +84,7 @@ Uninstall_lib()
fi fi
echo $serverPath/php/$version/etc/php.ini echo $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/swoole.so/d' $serverPath/php/$version/etc/php.ini sed -i '_bak' "/swoole.so/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile rm -f $extFile
$serverPath/php/init.d/php$version reload $serverPath/php/init.d/php$version reload

@ -36,10 +36,9 @@ Install_lib()
if [ $sysName == 'Darwin' ]; then if [ $sysName == 'Darwin' ]; then
wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-darwin-i386.tar.gz wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-darwin-i386.tar.gz
else else
wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/zend-loader-php5.6-linux-x86_64_update1.tar.gz wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
fi fi
cd $php_lib && tar xvf zend-loader-php5.3.tar.gz cd $php_lib && tar xvf zend-loader-php5.3.tar.gz
cd ZendGuardLoader-php* && cd php-5.3.x cd ZendGuardLoader-php* && cd php-5.3.x
cp ZendGuardLoader.so $serverPath/php/$version/lib/php/extensions/no-debug-non-zts-20090626/ cp ZendGuardLoader.so $serverPath/php/$version/lib/php/extensions/no-debug-non-zts-20090626/
@ -52,7 +51,13 @@ Install_lib()
return return
fi fi
echo -e "[Zend ZendGuard Loader]\nzend_extension=ZendGuardLoader.so\nzend_loader.enable=1\nzend_loader.disable_licensing=0\nzend_loader.obfuscation_level_support=3\nzend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini echo "" >> $serverPath/php/$version/etc/php.ini
echo "[Zend ZendGuard Loader]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=ZendGuardLoader.so" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.enable=1" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.disable_licensing=0" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.obfuscation_level_support=3" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini
$serverPath/php/init.d/php$version reload $serverPath/php/init.d/php$version reload
echo '===========================================================' echo '==========================================================='
@ -72,9 +77,9 @@ Uninstall_lib()
return return
fi fi
sed -i '_bak' '/ZendGuardLoader.so/d' $serverPath/php/$version/etc/php.ini sed -i '_bak' "/ZendGuardLoader.so/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/zend_loader/d' $serverPath/php/$version/etc/php.ini sed -i '_bak' "/zend_loader/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini sed -i '_bak' "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile rm -f $extFile
$serverPath/php/init.d/php$version reload $serverPath/php/init.d/php$version reload

@ -2,6 +2,8 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH export PATH
# /bin/bash apc.sh uninstall 53
curPath=`pwd` curPath=`pwd`
rootPath=$(dirname "$curPath") rootPath=$(dirname "$curPath")

@ -147,21 +147,6 @@
"shell": "imap.sh", "shell": "imap.sh",
"check": "imap.so" "check": "imap.so"
}, },
{
"name": "exif",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "用于读取图片EXIF信息",
"shell": "exif.sh",
"check": "exif.so"
},
{ {
"name": "intl", "name": "intl",
"versions": [ "versions": [

Loading…
Cancel
Save