I get this error collator_create: unable to open ICU collator: U_FILE_ACCESS_ERROR on Mac os with php54 installed via brew

StackOverflow https://stackoverflow.com/questions/22875431

  •  28-06-2023
  •  | 
  •  

Question

Some information about my system:

$php -v
PHP 5.4.26 (cli) (built: Apr  3 2014 04:46:38)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies


$php -i | grep intl
/usr/local/etc/php/5.4/conf.d/ext-intl.ini,
intl
intl.default_locale => en => en
intl.error_level => 0 => 0


$cat /usr/local/etc/php/5.4/conf.d/ext-intl.ini
[intl]
extension="/usr/local/Cellar/php54-intl/5.4.26/intl.so"

Here is the issue i'm having:

$php -r "var_dump(new Collator('en'));echo intl_get_error_message();"
NULL
collator_create: unable to open ICU collator: U_FILE_ACCESS_ERROR

I also tried php55 and got the same error.

Anyone knows what should I do to fix this?

Was it helpful?

Solution 2

I fixed this problem at a later date by reinstalling php and icu4c:

brew reinstall icu4c
brew reinstall php54 --with-intl

OTHER TIPS

its searching 'icudt52l.dat' where 52 is the version number of the ICU.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top