默认情况下,PHP5.3似乎缺少Intl扩展

默认情况下,PHP5.3似乎缺少Intl扩展,php,linux,ubuntu,icu,intl,Php,Linux,Ubuntu,Icu,Intl,我的系统是Ubuntu 12.04,PHP 5.3,我正在尝试运行一些基本的Intl代码,如下所示: <?php $coll = collator_create('en_US'); $result = collator_compare($coll, "string#1", "string#2"); 从5.3版开始,Intl扩展不是应该与PHP捆绑在一起吗 PHP是通过以下命令行通过apt get安装的(我不使用Apache): 下面是php-v产生的结果: PHP 5.3.10-1ub

我的系统是Ubuntu 12.04,PHP 5.3,我正在尝试运行一些基本的Intl代码,如下所示:

<?php
$coll  = collator_create('en_US');
$result = collator_compare($coll, "string#1", "string#2");
从5.3版开始,Intl扩展不是应该与PHP捆绑在一起吗

PHP是通过以下命令行通过apt get安装的(我不使用Apache):

下面是
php-v
产生的结果:

PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH

在php.ini中尝试取消注释扩展名intl“extension=php_intl.dll”,应在“extension”之前删除“;”,然后重新启动服务器。

您已经指定了
——在安装时启用intl
,以使用捆绑版本的intl,或者您可以通过PECL进行安装。见:


apt get install php5 intl
也会起作用。

php5 intl
添加到您安装的内容列表中


看起来它不是核心PHP5版本的一部分,尽管它是一个选项,类似于
PHPAPC
现在是php的标准部分,尽管您必须显式安装它。

Call
ini_get('disable_functions')
只是为了确保它没有被禁用?@Danack
ini_get('disable_functions')
输出一个空字符串。安装
php5 intl
完成了此操作。非常感谢。如果这对你有帮助的话,你应该把它标记为答案。谢谢。OP正在使用Ubuntu,这对它没有帮助。
apt-get install php5 php5-cli php5-mysql php5-cgi php5-fpm php5-curl php-apc php5-memcache php5-memcached php5-common php5-gd php-xml-parser php-pear php5-imap php5-mcrypt php5-xdebug php5-suhosin
PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH