Search code examples
phppeclintl

Class Normalizer not found (in PHP 5.3.8)


I'm receiving this PHP error while trying to use the Normalizer class, specifically the Normalizer::normalize function:

Fatal error: Class 'Normalizer' not found.

I'm currently using PHP 5.3.8 so, according to the PHP documentation, it should be activated by default. The only thing I can think about is a problem with the PECL intl extension.

I checked in the php/ext/ folder and the php_intl.dll is there. I checked the php.ini file, and there was no extension=php_intl.dll command, so I added it. But still no luck.

Additional info: When I run phpinfo, there is no mention about the PECL intl extension, so I'm guessing it's wasn't properly installed.


Solution

  • Quote from http://pecl.php.net/package/intl:

    The Internationalization extension exposes functionality of the ICU library to PHP.

    All the binaries depend on the ICU libraries (version 4.8), which must be available to PHP.

    just download and extract the content of the zip with ICU libraries in the folder where php.exe is and it will work

    ps: the php_intl.dll can be downloaded from the same location (in the description where is says "Windows binaries" :)