1

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

4

2 回答 2

3

Symfony 2.3 要求 intl 扩展名是版本>= 4.0(最好大于版本4.4),因为它依赖于symfony/intl组件。

Composer 将根据您的开发 ICU 版本下载不同版本symfony/intl并将其锁定在您的版本中。composer.lock

这意味着如果您在 ICU 大于 4.4 的系统上开发,您将无法在 ICU < 4.4 的服务器上安装。

请阅读文档章节ICU 和部署问题

按照我在此处的回答中的建议更新您的国际扩展名:

sudo aptitude install php5-intl 

...或添加

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

到你的composer.json.

于 2013-09-30T16:10:38.383 回答
0

对我来说,安装 symfony/intl

"symfony/intl": "2.5.5",

php composer.phar update symfony/intl
于 2014-09-30T19:20:43.180 回答