Установка

Модуль входит в стандартную поставку начиная с PHP 5.3.0. С PHP 5.2.0 можно использовать модуль PECL. Другими словами - есть два пути установки модуля.

Информация по установке этого расширения PECL может быть найдена в главе руководства Установка PECL расширений. Дополнительная информация, такая как новые версии, скачивание, исходные файлы, информация о разработчике и CHANGELOG, может быть найдена здесь: » https://pecl.php.net/package/intl.

Для установки встроенной версии модуля используйте --enable-intl при компиляции PHP.

Если ICU установлен в нестандартную директорию, то её необходимо указать в переменной окружения LD_LIBRARY_PATH, чтобы динамический линковщик смог его найти:

$ export LD_LIBRARY_PATH=/opt/icu/lib

В противном случае, если ICU установлен в стандартную директорию, то никаких дополнительных действий не требуется.

add a note add a note

User Contributed Notes 11 notes

up
12
jltupac at hotmail dot com
10 years ago
Ubuntu:
sudo apt-get install php5-intl
up
7
jonwebb at tecbiz dot eu
10 years ago
On windows servers, open your php.ini (which should be in Program Files/PHP), and simply uncomment the extension.
extension=php_intl.dll
Restart IIS Webserver - done.
up
3
daniel at danielphenry dot com
9 years ago
To install on windows uncommenting the dll in php.ini is not enough you also need to include several other libraries in your system path (not user path). Found these details here: http://stackoverflow.com/a/6086991/819883
up
1
hello at scottgruber dot me
7 years ago
For php7 on Ubuntu

sudo apt-get install php7.0-intl
up
0
lee dot wp14 at gmail dot com
3 years ago
For ubuntu: apt install php-intl
up
-5
spectrumcat
11 years ago
On Fedora 18 "pecl install intl" wasn't working after "yum -y install icu" so I had to run "yum -y install php-intl" instead
up
-7
ahmedelnaa2010 at gmail dot com
8 years ago
- open your php.ini file    c:/xampp/php/php.ini or search how to find it, it's up to your server.
- find for ;extension=php_intl.dll
- remove the comment ;
- restart the apache
- then it's working :)

i used the same when i have problem in any extensions, open php.ini then search for the extension then remove the comment.
up
-11
Epaphus
11 years ago
You need to install the library.

yum install libicu-devel

Will get it working with "pecl install intl"
up
-8
Anonymous
5 years ago
For windows I had to uncomment extension=intl in the php.ini
up
-11
nirbhabbarat at gmail dot com
9 years ago
OS : CentOS 5.10
PHP : 5.5.12
We tried installing via *pecl install intl* , but we were getting below warning in php error logs

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/intl.so' - /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/local/lib/libicuio.so.55) in Unknown on line 0

Later we tried icu source from http://site.icu-project.org/download
Compile ICU ./configure --prefix=/opt/icu && make && make install

And post which we compiled PHP via source with following configurations:
  --enable-intl
  --with-icu-dir=/opt/icu
up
-20
xgretsch
13 years ago
I'm running on Mac OS X using a MacPorts install. According to this page, my vanilla version of PHP 5.3.5 from MacPorts should include the intl functions by default. As far as I can see from phpinfo(), the MacPorts version did not disable it. However, the functions aren't visible and don't work.

It seems to require an additional:

sudo port install php5-intl

After which everything bursts into life.
To Top