Pergunta

I get this error:

Fatal error: Call to undefined function locale_get_default() on linux hosting (cpanel). The PHP Version is 5.3

I use this to detect users location and language

Here PHP documentation and it has a sample code

http://php.net/manual/en/locale.getdefault.php

I had same issue in localhost using xampp and got it resolved using this post locale_get_default() function issue on localhost

But in web hosting i get the same error

Foi útil?

Solução

This function requires PECL intl >= 1.0.0... check this;

http://php.undmedlibrary.org/manual/en/function.locale-get-default.php

Check if it installed. If not, ask your hosting provider to install it.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top