[英]PHP intl extension doesn't work
I've installed the intl extension via PECL on Debian Squeeze. 我在Debian Squeeze上通过PECL安装了intl扩展。 But when I put extension=intl.so
in my php.ini file and restart Apache, it loads CP to about 99% and nothing works. 但是当我在我的php.ini文件中放入extension=intl.so
并重新启动Apache时,它会将CP加载到大约99%并且没有任何效果。 The only way to make the server work again is to remove the extension=intl.so
line from php.ini file. 使服务器再次工作的唯一方法是从php.ini文件中删除extension=intl.so
行。 Why? 为什么?
Apache error log is: Apache错误日志是:
[Wed Nov 28 23:09:59 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec) PHP Warning: Function registration failed - duplicate name - idn_to_ascii in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - idn_to_utf8 in Unknown on line 0 PHP Warning: idn: Unable to register functions, unable to load in Unknown on line 0 [Wed Nov 28 23:09:59 2012] [通知]启用suEXEC机制(包装器:/ usr / lib / apache2 / suexec)PHP警告:函数注册失败 - 重复名称 - 第0行中未知的idn_to_ascii PHP警告:函数注册失败 - 重复名称 - 第0行的未知中的idn_to_utf8 PHP警告:idn:无法注册函数,无法在第0行加载未知
function names need to be unique for obvious reasons. 功能名称必须是唯一的,原因很明显。
The (recommended) extension intl
provides the functions idn_to_ascii
and idn_to_utf8
(along with other helpful functions), as well as the pecl extension idn
( source ) (推荐)扩展intl
提供函数idn_to_ascii
和idn_to_utf8
(以及其他有用的函数),以及pecl扩展idn
( 源代码 )
idn is in (early) beta since 2009 and no longer developed. 自2009年以来,idn处于(早期)测试阶段并且不再发展。
How do I fix that?? 我该如何解决?
What you have to do is to uninstall your idn extension 你要做的是卸载你的idn扩展
apt-get remove php-pecl-idn
or ( depends how this was installed ) 或(取决于如何安装)
pecl uninstall idn
or simply comment the the extension in your config 或者只是在配置中注释扩展名
; extension=idn.so
then restartart your apache 然后重新启动你的apache
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.