PHP ICONV glibc到CentOS 5.5上的libiconv [英] PHP ICONV glibc to libiconv on CentOS 5.5

查看:232
本文介绍了PHP ICONV glibc到CentOS 5.5上的libiconv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题的PHP函数iconv,我已经跟踪了iconv实现。正如手册所述,注意一些系统上的iconv功能可能不能按您的期望工作,在这种情况下,最好安装GNU libiconv库。 http://uk3.php.net/manual/en/intro.iconv.php

I'm having a few issues with the PHP function iconv, which I've tracked down the the iconv implementation. As the manual states, "Note that the iconv function on some systems may not work as you expect. In such case, it'd be a good idea to install the GNU libiconv library." http://uk3.php.net/manual/en/intro.iconv.php

我已从 http://www.gnu.org/software/libiconv/ ,并使用以下方法安装:

I've downloaded the libiconv library from http://www.gnu.org/software/libiconv/ and installed it without any problems using:

$ ./configure --prefix=/usr/local
$ make
$ make install

现在我的问题是如何将此安装链接到PHP?从我读了我需要重新编译PHP与

My problem now is how to link this installation to PHP? From what i've read I need to recompile PHP with

--with-iconv-dir=/usr/local/

但是如何在CentOS上这样做?我用

but how do I do this on CentOS? I installed php with

yum install php.x86_64

我尝试了 yum重新安装php ,但是当我服务httpd重新启动时,我的phpinfo读取相同, glibc

I tried yum reinstall php but when I service httpd restart my phpinfo reads the same, glibc.

有没有更好的方法在CentOS上安装libiconv?

Is there a better way to install libiconv on CentOS? If not how do I get PHP using this installation without upsetting yum?

很感谢提前

推荐答案

手动更改配置脚本后,您应该手动重新编译php iconv扩展(在 php-xyz / ext / iconv / 子目录中)强制它选择GNU libiconv而不是glibc的iconv。请参阅我的 answer 类似的堆栈问题。

You should manually recompile the php iconv extension (in the php-x.y.z/ext/iconv/ subdirectory) after manual changing of the configure script to force it to select GNU libiconv instead of glibc's iconv. See my answer for the similar Stack question.

这篇关于PHP ICONV glibc到CentOS 5.5上的libiconv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆