Question

I've been working on a local development machine running Ubuntu 12 developing a Symfony2.3.5 application.

All works well, until I uploaded the code and came across this:

Could not load the resource bundle "/home/project/public_html/vendor/symfony/icu/Symfony/Component/Icu/Resources/data/region/en.res".

The server is currently running the following:

CENTOS 5.9 x86_64 standard WHM 11.38.2 (build 7)

In WHM I've installed intl via the EasyApache installer, yet I'm still getting this error.

This installed ICU 3.6. My development version is 4.8.1, so about 10 years newer.

Is the ICU version the problem here? It's the only thing I can see.

The application I've built is en-only. It does not need to be in any other language other than English (UK).

Does anyone have any ideas / fixes for this?

Thanks

Was it helpful?

Solution

Symfony 2.3 requires the intl extension to be version >= 4.0 ( a version greater than 4.4 at best ) because of it's dependency to the symfony/intl component.

Composer will download different versions of symfony/intl and lock these in your composer.lock depending on your development ICU version.

This means if you develop on a system with ICU greater than 4.4 you won't be able to install on a server with ICU < 4.4.

Please read the documentation chapter ICU and Deployment Problems.

Update your intl extension as suggested in my answer here:

sudo aptitude install php5-intl 

... or add

"require: {
    "symfony/icu": "1.0.*"
}

to your composer.json.

OTHER TIPS

For me worked installing symfony/intl

"symfony/intl": "2.5.5",

php composer.phar update symfony/intl
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top