Home > php教程 > php手册 > body text

WDCP从php5.2升级到5.3的办法,以及升级过程中iconv错误的处理

WBOY
Release: 2016-06-06 19:43:26
Original
1060 people have browsed it

从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>
Copy after login

但是在实际升级过程中,部分朋友执行到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>
Copy after login

这时候可以执行下面的命令:

<span>wget</span> http:<span>//</span><span>down.wdlinux.cn/in/iconv_ins.sh</span>
<span>sh</span> iconv_ins.<span>sh</span>
Copy after login

这个命令成功执行之后重新make就没问题了,接着执行上面的升级命令,当你看到下面的提示的时候则表示你升级成功了,,看一下phpinfo()的结果吧!

<span>Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]</span>
Copy after login

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template