locale_get_default() function issue on localhost

5k views Asked by At

Im using wampserver on localhost with;

  • PHP 5.3.13
  • Apache 2.2.22
  • Enabled php_intl.dll extension

But i got following error while using locale_get_default() function

Fatal error: Call to undefined function locale_get_default() in

Or using Locale::getDefault() function

Fatal error: Class 'Locale' not found in

2

There are 2 answers

1
Bora On BEST ANSWER

Solved with Following Link

http://forum.wampserver.com/read.php?2,80704,116793

Ok, I got it to work. It looks like Apache can't find the icu*.dll files (in the php directory).

So, one solution is to add "C:\wamp\bin\php\php5.3.9" (or similar directory) to your system PATH.

The other solution is to copy the icu*.dll files to your apache's bin directory.

A third option is to copy the icu*.dll files to your Windows system directory (system32 or SysWOW64).

3
Ronald Swets On

snip didnt read:

Are you sure the extension is loaded? (See phpinfo();)