The method of adding Iconv module to PHP under Linux, Linuxiconv
./configure--with-mysql=/backup/mysql--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-curl-- WITH-GD--enable-gd-native-ttf--with-apxs2=/usr/local/apache/bin/apxs--enable-sockets--with-iconv
Make when prompted:
Copy CodeThe code is as follows:
.....................................................
EXT/ICONV/.LIBS/ICONV.O (. text+0x1738): In function ' Zif_iconv_mime_encode ':
/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1017:undefined reference to ' Libiconv_open '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1756):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1031:undefined Reference to ' Libiconv_open '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1993):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1290:undefined Reference to ' Libiconv_close '
EXT/ICONV/.LIBS/ICONV.O (. Text+0x19ad):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1293:undefined Reference to ' Libiconv_close '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1b01):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1102:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1b33):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1134:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1b5e):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1150:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. Text+0x1e10):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1202:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x1e3c):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1233:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x207f):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1277:more undefined References to ' Libiconv ' follow
EXT/ICONV/.LIBS/ICONV.O (. text+0x2c08): In function ' Php_iconv_stream_filter_dtor ':
/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2393:undefined reference to ' Libiconv_close '
EXT/ICONV/.LIBS/ICONV.O (. text+0x2cf2): In function ' Php_iconv_stream_filter_append_bucket ':
/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2543:undefined reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x2d34):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2543:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. Text+0x2de7):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2465:undefined Reference to ' Libiconv '
EXT/ICONV/.LIBS/ICONV.O (. text+0x30e2): In function ' php_iconv_stream_filter_factory_create ':
/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2419:undefined reference to ' Libiconv_open '
Collect2:ld returned 1 exit status
Make: * * * [sapi/cli/php] Error 1
Workaround
Copy the Code code as follows:
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
TAR-ZXVF libiconv-1.13.1.tar.gz
CD libiconv-1.13.1
./configure--prefix=/usr/local/libiconv
Make
Make install
Check PHP again
Copy the Code code as follows:
#./configure--with-mysql=/backup/mysql--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-curl-- WITH-GD--enable-gd-native-ttf--with-apxs2=/usr/local/apache/bin/apxs--enable-sockets--with-iconv=/usr/local/ Libiconv
#make
#make Install
Another solution for removing the Iconv module is to compile PHP normally, as follows:
Edit Makefile about 77 rows of places:
Extra_libs = ...-lcrypt
In the end, add-liconv, for example:
Extra_libs = ...-lcrypt-liconv
Run make again.
http://www.bkjia.com/PHPjc/1104327.html www.bkjia.com true http://www.bkjia.com/PHPjc/1104327.html techarticle The method of adding Iconv modules for PHP under Linux, Linuxiconv./configure--with-mysql=/backup/mysql--with-freetype-dir--with-jpeg-dir-- With-png-dir--with-zlib--with-curl--with-gd--...