Friday, 15 April 2011

linux - PHP 5.3 seems to be missing Intl extension by default -



linux - PHP 5.3 seems to be missing Intl extension by default -

my scheme ubuntu 12.04, php 5.3, , i'm trying run basic intl code this:

<?php $coll = collator_create('en_us'); $result = collator_compare($coll, "string#1", "string#2");

and outputs

php fatal error: phone call undefined function collator_create()

wasn't intl extension supposed bundled php since version 5.3?

php installed via apt-get command line (i don't utilize apache):

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

and here php -v produces:

php 5.3.10-1ubuntu3.5 suhosin-patch (cli) (built: jan 18 2013 23:40:19) copyright (c) 1997-2012 php grouping zend engine v2.3.0, copyright (c) 1998-2012 zend technologies xdebug v2.1.0, copyright (c) 2002-2010, derick rethans suhosin v0.9.33, copyright (c) 2007-2012, sektioneins gmbh

you have specify --enable-intl when installing utilize bundled version of intl, or can install via pecl. see: http://www.php.net/manual/en/intl.installation.php

apt-get install php5-intl work.

php linux ubuntu icu intl

No comments:

Post a Comment