search
Homephp教程php手册WDCP从php5.2升级到5.3的办法,以及升级过程中iconv错误的处理

从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>

 

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor