locale_get_default() function issue on localhost

让人想犯罪 __ 提交于 2019-12-25 02:39:08

问题


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


回答1:


snip didnt read:

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




回答2:


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



来源:https://stackoverflow.com/questions/20520026/locale-get-default-function-issue-on-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!