Class Normalizer not found (in PHP 5.3.8)
Asked Answered
L

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. Beyond that I have no idea. Can anybody please tell me what the hell is going on here?

Thanks

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.

What solved my problem:

http://www.tiv.net/2010/12/php-intl-extension-windows-apache.html, uninstalling XAMPP 1.77 (which has some kind of internal bug with the PECL intl extension) and installing XAMPP 1.73.

Loosestrife answered 21/12, 2011 at 22:17 Comment(4)
Are you running apache (or another http server) ? have you restarted it ?Selfsatisfaction
Yes, and in Xampp (for Windows). I restarted it and nothing changed :/Loosestrife
did you read php.net/manual/en/install.windows.extensions.php where other extensions are stored on your machine ?Incentive
Did you tried to enable intl extension in xampp panel (I suspect that there should be some admin panel :)) ?Incentive
C
4

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" :)

Chemical answered 20/3, 2012 at 16:59 Comment(1)
Thanks for your answer, too bad I'm using a paid hosting now and I don't have that kind of access :/. Good to know anywaysLoosestrife
P
10

If you are on ubuntu:

sudo apt install php-intl
Playacting answered 18/1, 2022 at 14:27 Comment(1)
Was hopeful this would do it for me on a fresh Ubuntu 21.10 laptop but it simply says php-intl is already installed.Thoughts? I get that Class 'Normalizer' not found when I try to do anything with Composer (v. 2.0.9)Notepaper
C
4

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" :)

Chemical answered 20/3, 2012 at 16:59 Comment(1)
Thanks for your answer, too bad I'm using a paid hosting now and I don't have that kind of access :/. Good to know anywaysLoosestrife
O
2

Left-click on the WAMP tray icon, go to PHP, go to PHP extensions and check php_intl. Than restart the server.

Because WAMP(server) uses another settings file everything looks fine while it doesn't.

Omora answered 21/12, 2011 at 23:42 Comment(2)
Thanks, I was using XAMPP not WAMP though, so it wasn't of too much help.Loosestrife
clearly written for XAMPP not WAMP, first read question then answer thatSecretive

© 2022 - 2024 — McMap. All rights reserved.