0

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

Bora
  • 10,529
  • 5
  • 43
  • 73

2 Answers2

0

snip didnt read:

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

Ronald Swets
  • 1,669
  • 10
  • 16
  • I couldnt see in phpinfo but i was enabled from settings and checked in php.ini file. Because of what? – Bora Dec 11 '13 at 13:36
  • If it does not show as loaded in phpinfo(); it is not loaded hence the undefined function error. Are you sure the .dll is the proper version for the used PHP version? – Ronald Swets Dec 11 '13 at 13:45
  • I solved with following link: http://forum.wampserver.com/read.php?2,80704,116793 thanks – Bora Dec 11 '13 at 14:26
0

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).

Bora
  • 10,529
  • 5
  • 43
  • 73
  • The best solution is to copy the icu files into the Apache folder. Of course when you switch PHP or Apache version you need to make sure you do it again. If you copy them to system32 or add a folder to the path it is less flexible, and you may end up with the wrong files being pointed to. – RiggsFolly Dec 12 '13 at 23:48