I\'ve been using this exact same code for ages, and I have never had a single problem. Now all of a sudden it has stopped working.
I have read across the internet ab
All you need is:
apt-get install php7.0-intl
No need to change php.ini or do anything else. (Tested on PHP 7 on Ubuntu 16.04).
The most up-voted answer here has you uncommenting a .dll which will never solve anything unless you are on a Windows server!
This means that your intl
package for PHP is not installed and/or not enabled.
Step 1
Make sure that you install php7.2-intl
(or check that it is installed). In my case, I had PHP 7.2, but the version could change.
To install, I used
sudo apt install php7.2-intl
Step 2
After a successful installation, go to php.ini
and enable that extension by removing the comment, as follows
extension=intl
Step 3
Retstart apache
sudo service apache2 restart
Change in php extensions did not work for me so I updated my php version from php 5.6.25 to 7.0.10 and it worked
You just need to enable this extension in php.ini
by uncommenting this line:
extension=ext/php_intl.dll
For more details visit, Enable intl extension
Solutions For ALL Windows and Mac.
Most of time this extension is not there, You just need to enable this extension in php.ini by uncommenting this line,
extension=intl
if that line doesn't exists then add that line as like below in any place below first line,
extension=intl
extension=ext/php_intl.dll
for better result add below as like as well because with above one is in some scenario not working with only below one,
extension=php_intl.dll
Then it look like this,
extension=ext/php_intl.dll
extension=php_intl.dll
extension=intl
After That Mostly Don't Forgot to restart your server in my case I am using xampp otherwise the changes not working properly.
If you are using Google App Engine, just add:
extension = "intl.so"
to your application's php.ini file.
https://cloud.google.com/appengine/docs/php/runtime