无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
【300G高防】双线 无视攻击 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[BUG反馈] 求助管理员,用wdcp的一个php升级脚本升级到5.3的PHP时报错

升级脚本名为:php_up53.sh  (附件)
执行  sh php_up53.sh 时报错如下截图:
data.png

奇怪,附件看不到。我直接贴脚本代码吧

#!/bin/bash

###yum
yum install -y libmcrypt-devel libjpeg-devel libpng-devel freetype-devel curl-devel openssl-devel libxml2-devel

###
Ver=5.3.17
if [ ! -f php-${Ver}.tar.gz ];then
        wget -c http://dl.wdlinux.cn:5180/soft/php-${Ver}.tar.gz
fi
if [ ! -f iconv_ins.sh ];then
        wget -c http://down.wdlinux.cn/in/iconv_ins.sh
        sh iconv_ins.sh
fi

###
tar zxvf php-${Ver}.tar.gz
cd php-${Ver}
if [ -d /www/wdlinux/apache_php ];then
make clean
        ./configure --prefix=/www/wdlinux/apache_php-${Ver} --with-config-file-path=/www/wdlinux/apache_php-${Ver}/etc --with-mysql=/www/wdlinux/mysql --with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --enable-sockets --enable-zip --with-apxs2=/www/wdlinux/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd
[ $? != 0 ] && echo "configure err" && exit
make
[ $? != 0 ] && echo "make err" && exit
make install
[ $? != 0 ] && echo "make install err" && exit
cp php.ini-production /www/wdlinux/apache_php-${Ver}/etc/php.ini
#grep '\[eaccelerator\]' -A15 /www/wdlinux/apache_php/etc/php.ini >> /www/wdlinux/apache_php-${Ver}/etc/php.ini
#grep '\[Zend\]' -A5 /www/wdlinux/apache_php/etc/php.ini >> /www/wdlinux/apache_php-${Ver}/etc/php.ini
sed -i 's/short_open_tag = Off/short_open_tag = On/g' /www/wdlinux/apache_php-${Ver}/etc/php.ini
rm -f /www/wdlinux/apache_php
ln -sf /www/wdlinux/apache_php-${Ver} /www/wdlinux/apache_php
service httpd restart
echo
echo "php update is OK"
fi

if [ -d /www/wdlinux/nginx_php ];then
make clean
        ./configure --prefix=/www/wdlinux/nginx_php-${Ver} --with-config-file-path=/www/wdlinux/nginx_php-${Ver}/etc --with-mysql=/www/wdlinux/mysql --with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --enable-sockets --enable-zip --enable-fpm
[ $? != 0 ] && echo "configure err" && exit
make
[ $? != 0 ] && echo "make err" && exit
make install
[ $? != 0 ] && echo "make install err" && exit
cp php.ini-production /www/wdlinux/nginx_php-${Ver}/etc/php.ini
#grep '\[eaccelerator\]' -A15 /www/wdlinux/nginx_php/etc/php.ini >> /www/wdlinux/nginx_php-${Ver}/etc/php.ini
#grep '\[Zend\]' -A5 /www/wdlinux/nginx_php/etc/php.ini >> /www/wdlinux/nginx_php-${Ver}/etc/php.ini
sed -i 's/short_open_tag = Off/short_open_tag = On/g' /www/wdlinux/nginx_php-${Ver}/etc/php.ini
service php-fpm stop
rm -f /www/wdlinux/nginx_php
ln -sf /www/wdlinux/nginx_php-${Ver} /www/wdlinux/nginx_php
cp /www/wdlinux/nginx_php-${Ver}/etc/php-fpm.conf.default /www/wdlinux/nginx_php-${Ver}/etc/php-fpm.conf
sed -i 's/user = nobody/user = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
sed -i 's/group = nobody/group = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
sed -i 's/;pid =/pid =/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
cp -f sapi/fpm/init.d.php-fpm /www/wdlinux/init.d/php-fpm
chmod 755 /www/wdlinux/init.d/php-fpm
service php-fpm start
echo
echo "php update is OK"
fi
echo

TOP

返回列表