4

After having successfully installed and updated all vendors in my project folder for Sylius i tried running this code :

app/console sylius:install --fixtures

I get this error :

PHP Fatal error: Class 'ResourceBundle' not found in C:\wamp\www\sylius\vendor\ symfony\symfony\src\Symfony\Component\Locale\Locale.php on line 51

Then i tried all possible solutions given here

Installed intl extension in php (working successfully).Then ran this command

php build-data.php 'your ICU version'

On running the above command i get this:

'which' is not recognized as an internal or external command, operable program or batch file. The command "svn" is not installed

I want to know if there is another workaround to this issue. Please help and thanks in advance.

P.S. - No SVN runs on my system. And i'm using icu*46.dll

Anyone came across this??

J.Cage
  • 369
  • 2
  • 18

1 Answers1

1

This error relates to be PHP intl-extension. Make sure it is enabled and you have the LATEST version.

quick test:

<?php
    var_dump(extension_loaded('intl'));

Make sure your PHP folder is correctly registered in your %PATH% environment variable.

Control Panel - System - Advanced - ...

Without that, the ICU dlls are not loaded by PHP as Apache module - no error message is displayed, but the extension is not enabled.

Check aswell from phpinfo() ! not with ...

php -m

... or ( windows = findstr, linux/cygwin = grep )

php -i | findstr intl

check that the extension is enabled in your php.ini ( dont know WAMP's extenion path so adjust it please )

extension=php_intl.dll

As i can see you are on Windows and using WAMP you will have to get a precompiled version of the extension.

The packages on http://windows.php.net/download/ all contain the php_intl.dll in the ext folder.

Make sure that the ICU is compiled with the same version of MSVC that PHP is.

You run into problems if the ICU was compiled with VC10 and PHP was with VC9.

Although php -m and php -i detect the INTL it wouldn't show up in phpinfo().

Nicolai Fröhlich
  • 51,330
  • 11
  • 126
  • 130
  • I have looked far and wide, all i got to know was there is a mismatch in the icu*.dll files used in my wamp server files and those compiled by symfony2.2. Anyone?? – J.Cage Jun 14 '13 at 04:42
  • know your icu version? A quick fix is to go into `vendor/symfony/symfony/src/Component/Locale/Locale.php` and change `const ICU_DATA_VERSION` to match your installed ICU version. – Nicolai Fröhlich Jun 14 '13 at 04:45
  • 2
    Yes..my icu installed icu version is 46. I tried changing the `const ICU_DATA_VERSION` to 46 but to no avail. – J.Cage Jun 14 '13 at 05:11
  • tried newer one from http://site.icu-project.org/download ? btw the versions contain a dot usually 46 is not going to work. – Nicolai Fröhlich Jun 14 '13 at 05:16
  • Thanks..i did try with 4.6 but still doesn't work. And on the link that u gave i'm unable to find icudll files compiled with VC9 for windows 32. What are my chances now??('exhausted') – J.Cage Jun 14 '13 at 06:01
  • hm quickly updating apache in wamp is not an option? i think you should be able to exchange apache in your wamp install with a new version easily :) – Nicolai Fröhlich Jun 14 '13 at 06:05
  • Sorry..i dint get you. But does that mean i will have to make a custom set of php and apache compiled with VC10? (cuz currently it is VC9) – J.Cage Jun 14 '13 at 06:13
  • 1
    why not get v10 versions of apache and php and copy over your current configuration. should not be too much of a hassle? whilst php can be found on the php download pages you can get a precompiled apache at http://www.apachelounge.com/download/ – Nicolai Fröhlich Jun 14 '13 at 06:15
  • Surely i'll do that.And this sums up that your first answer was the correct one..de facto **You run into problems if the ICU was compiled with VC10 and PHP was with VC9.**. Thanks a ton :) – J.Cage Jun 14 '13 at 06:21
  • glad i could help somehow - happy coding :) – Nicolai Fröhlich Jun 14 '13 at 06:22