5

I am getting this exception, its one of the known issues and as suggested I have installed php5-intl via apt-get and restarted my Nginx server.

Nothing seems to work out.

An exception has been thrown during the rendering of a template
("The Symfony\Component\Locale\Stub\StubIntlDateFormatter::__construct() method's argument $locale value 'en_IN' behavior is not implemented. Only the 'en' locale is supported.

Please install the 'intl' extension for full localization capabilities.")
in SonataAdminBundle:CRUD:base_list_field.html.twig at line 4.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
ʞɹᴉʞ ǝʌɐp
  • 5,350
  • 8
  • 39
  • 65
  • I did sudo apt-get install php5-intl to install the extensions. Restarted nginx and cleared symfony cache as well but nothing seems to work out. – ʞɹᴉʞ ǝʌɐp Aug 10 '12 at 10:03
  • Have you tried with a different locale? Maybe `en_US`... – Florent Aug 10 '12 at 10:05
  • If you have standard edition try to run `php app/check.php` which check if you have installed intl properly. See https://github.com/symfony/symfony-standard/blob/master/app/check.php – l3l0 Aug 10 '12 at 10:22
  • Thanks Florent, I3I0. Sorry for getting back to you guys a bit late. I tried with en_US but it dint work. app/check.php shows everything ok as expected. – ʞɹᴉʞ ǝʌɐp Aug 14 '12 at 05:21
  • @l3l0 should be right. The problem is not the php extension which should be installed in anyway. The Symfony component should fix the issue: http://symfony.com/doc/current/components/intl.html – webDEVILopers Mar 21 '15 at 13:21

3 Answers3

2

Guys revisiting this issue, Team faced the same issue, we tried installing php5-intl extension and restart nginx & php5-fpm.

It didn't work. But we did a system restart the issue was gone. So one more weird answer. But worked for me.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
ʞɹᴉʞ ǝʌɐp
  • 5,350
  • 8
  • 39
  • 65
  • 1
    php5-intl extension is required anyways in case it does not work try above trick. – ʞɹᴉʞ ǝʌɐp Dec 07 '12 at 11:44
  • Encoutered on OS X 10.10 Yosemite with native PHP Engine. `icu` installation OK, `intl` PHP extension installion OK, `php -m | grep 'intl'` gives back `intl` as expected, but still the same error. A reboot did the trick. – Ronan Oct 20 '14 at 08:59
1

These are simple steps to install the intl on Mac OS X:

  1. brew install icu4c

  2. sudo pecl install intl

    The path to the ICU libraries and headers is: /usr/local/opt/icu4c/

  3. Edit /etc/php.ini and find and uncomment

    ;extension=intl.so
    

    or add

    extension=intl.so
    

    to the end of file.

  4. Create new page and put

    <?php phpinfo();?>
    

    in to see if Intl is installed successfully or not.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
0

I had this problem on my local OSX setup, which uses homebrew.

I had installed intl and it was showing up when I ran php -v, so I didn't understand where the problem was coming from.

Turned out that the php version apache was using was different from the php version cli was using. So make sure to check out php -v AND run a phpinfo() through your browser, when verifying if your intl extension is enabled.

In my case, the LoadModule directive in my apache's httpd.conf had changed. I ran brew info php54 to get the right LoadModule to put in my httpd.conf.

hisem
  • 71
  • 1
  • 6