A php platform install ask me intl extension, but it seems already installed
Asked Answered
Z

4

9

During orocrm installation (a platform developed with symfony 2) I receive this error

Fatal error: Uncaught exception 'Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException' with message 'The   Symfony\Component\Intl\Collator\Collator::__construct() method's argument $locale value 'fr_FR' behavior   is not implemented. Only the locale "en" is supported.  Please install the "intl" extension for full    localization capabilities.' in /Users/ale/Sites/educacloud-  bo/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php:80
Stack trace:
#0 /Users/ale/Sites/educacloud-bo/app/SymfonyRequirements.php(619):   Symfony\Component\Intl\Collator\Collator->__construct('fr_FR')
#1 /Users/ale/Sites/educacloud-bo/app/OroRequirements.php(24): SymfonyRequirements->__construct()
#2 /Users/ale/Sites/educacloud-bo/app/oro-check.php(6): OroRequirements->__construct()
#3 {main}
thrown in /Users/ale/Sites/educacloud-bo/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php on line 80

but I have installed intl extension:

# php -i | grep intl
 /usr/local/php5/php.d/50-extension-intl.ini,
 intl 
 intl.default_locale => it_IT => it_IT
 intl.error_level => 0 => 0

and php_info() on my browser give me these results:

version 1.1.0
ICU version 4.6
ICU Data version    4.6

What is the problem? thanks Alessandra

Zillion answered 8/9, 2014 at 12:1 Comment(4)
What version of symfony/icu is installed?Danube
Symfony version 2.3.19. I don't want to change locale, I want to un-traslate some bundles.Zillion
I asked not symfony version but icu-version. You can find it in composer.lock file.Danube
I have the same issue. This happens to me in production (ubuntu 14) and not in dev (debian). In production php5-intl triggers the dependency installation of libicu52, maybe some backward compatibility issues hereDracaena
W
2

By default, symfony2 is able to manage the "en" extension but to get other language, you have to install the php-intl extension.

The easiest option is to install it with the composer, because it expose global variable for you ... etc

All of this is explained here symfony/components/intl.

For the composer extension installation it's symfony/components/using_components.

So after eading this, you need to execute :

composer require symfony/intl

-- EDIT

Ok, I'm sorry, I've just test the solution, and the fact is : if you use the symfony component you have only access to "en". I have the same problem as you, my php5-intl extension was installed and activated but the error persisted. For me it was that I continue to write use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; at the top of my file instead of using the basic php5 extension.

Winnifredwinning answered 28/1, 2015 at 10:38 Comment(0)
M
2

Do one thing that might be helpful for resolve this error open php.ini file remove comment from ;extension=php_intl.dll

extension=php_intl.dll

and restart the Apache server

Marelda answered 2/12, 2016 at 9:56 Comment(0)
S
1

You need re install package int1

apt-get install php-intl

service apache2 restart
Stlaurent answered 3/8, 2020 at 18:43 Comment(0)
M
0

Check solutions:

In Symfony 2.0:

app/config/config.yml

framework: session: { default_locale: it_IT }

In Symfony 2.1+:

app/config/config.yml

framework: default_locale: it_IT

Modred answered 9/9, 2014 at 11:5 Comment(1)
An installation of Symfony Standard Edition already sets this parameter. I have the same issue with the param already setDracaena

© 2022 - 2024 — McMap. All rights reserved.