从wdcp官方论坛我们可以找到一个询问升级的帖子,然后管理员在回复中也提供了升级方法: cd / tmp wget -c http: // dl.wdlinux.cn:5180/soft/php-5.3.10.tar.gz tar zxvf php- 5.3 . 10 . tar .gzcd php - 5.3 . 10 . /configure --prefix=/www/wdlinux/php
从wdcp官方论坛我们可以找到一个询问升级的帖子,然后管理员在回复中也提供了升级方法:
cd /<span>tmp </span><span>wget</span> -c http:<span>//</span><span>dl.wdlinux.cn:5180/soft/php-5.3.10.tar.gz</span> <span>tar</span> zxvf php-<span>5.3</span>.<span>10</span>.<span>tar</span><span>.gz cd php</span>-<span>5.3</span>.<span>10</span><span> .</span>/configure --prefix=/www/wdlinux/php-<span>5.3</span>.<span>10</span> --with-config-<span>file</span>-path=/www/wdlinux/etc --with-mysql=/www/wdlinux/mysql --with-iconv=/usr --with-freetype-<span>dir</span> --with-jpeg-<span>dir</span> --with-png-<span>dir</span> --with-zlib --with-libxml-<span>dir</span>=/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-<span>ftp</span> --with-apxs2=/www/wdlinux/apache/bin/<span>apxs </span><span>make</span> <span>make</span> <span>install</span> <span>rm</span> -f /www/wdlinx/<span>php </span><span>ln</span> -s /www/wdlinux/php-<span>5.3</span>.<span>10</span> /www/wdlinux/<span>php service httpd restart</span>
但是在实际升级过程中,部分朋友执行到make这一部的时候会遇到iconv错误,提示:
/root/php-<span>5.3</span>.<span>17</span>/ext/iconv/iconv.c: In <span>function</span><span> ‘zm_startup_miconv’: </span>/root/php-<span>5.3</span>.<span>17</span>/ext/iconv/iconv.c:<span>254</span><span>: 错误:‘_libiconv_version’ 未声明 (在此函数内第一次使用) </span>/root/php-<span>5.3</span>.<span>17</span>/ext/iconv/iconv.c:<span>254</span><span>: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其 </span>/root/php-<span>5.3</span>.<span>17</span>/ext/iconv/iconv.c:<span>254</span><span>: 错误:所在的函数内只报告一次。) </span><span>make</span>: *** [ext/iconv/iconv.lo] 错误 <span>1</span>
这时候可以执行下面的命令:
<span>wget</span> http:<span>//</span><span>down.wdlinux.cn/in/iconv_ins.sh</span> <span>sh</span> iconv_ins.<span>sh</span>
这个命令成功执行之后重新make就没问题了,接着执行上面的升级命令,当你看到下面的提示的时候则表示你升级成功了,,看一下phpinfo()的结果吧!
<span>Stopping httpd: [ OK ] Starting httpd: [ OK ]</span>