Fatal error: Class 'NumberFormatter' not found

前端 未结 15 837
误落风尘
误落风尘 2020-12-28 13:08

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

相关标签:
15条回答
  • 2020-12-28 13:21

    outdated

    On Max OS X with PHP installed with the Homebrew, we can:

    We can check is module intl installed:

    $ php -m
    

    We can check module info:

    $ brew info php72-intl
    

    And install it with:

    $ brew install php72-intl
    
    0 讨论(0)
  • 2020-12-28 13:26

    This seems to be some really weird problem, and I somehow fixed it by doing the following:

    I upgraded my PHP in Wamp through this tutorial. I also updated my timezone in php.ini When I upgraded it didn't work, so I reverted back to my previous version of PHP, and voilà - it worked.

    I have absolutely no idea how this solved the problem, however it worked for me.

    0 讨论(0)
  • 2020-12-28 13:33

    On CentOS 8:

    sudo dnf install php-intl
    
    0 讨论(0)
  • 2020-12-28 13:36

    Add your PHP directory in the Path environment variable. (C:\Program Files\wamp\bin\php\phpX.XXX.XXX for wamp)

    It has worked for me!

    0 讨论(0)
  • 2020-12-28 13:37

    I am using PHP 5.5 version and got the same error in Ubuntu Machine. I have installed php5-Intl package and restarted my apache server. This resolved the issue.

    For PHP5

    sudo apt-get install php5-intl
    

    For PHP7

    sudo apt-get install php7.0-intl
    

    For Mac OS X, use the following command for PHP5.6

    brew install php56-intl
    

    For different OS, checkout this page : http://php.net/manual/en/intl.installation.php

    To check successful installation, run the command php -m. This should show the intl package in the list.

    If you are using XAMPP in Mac OS X, php-intl will sometimes create different problems. You can follow the debug steps mentioned here

    If you are facing Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' error, follow the steps as mentioned here

    0 讨论(0)
  • 2020-12-28 13:39

    This worked for me (Ubuntu 18.10, PHP 7.2.15)

    sudo apt-get install php-intl
    service apache2 restart
    
    0 讨论(0)
提交回复
热议问题