9

When I deployed my magento store from local host to server then I am getting

Fatal error: Class 'IntlDateFormatter' not found in vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on line 93`

After uploading it on server I not seeing my magento home page. when I hit the URL only this error display.

1
  • IntlDateFormatter class is provided by intl extension. Magento requires intl-ext. Did you run composer update? If after composer update extension is not installed, try to add it to your project composer.json and run composer install
    – joni jones
    Sep 20, 2017 at 8:08

5 Answers 5

13

Check your php version :

php -v

Check php-intl packages available :

sudo apt search php | grep intl

Install the php-intl according to your php version (7.1 in my case) :

sudo apt install php-intl php7.1-intl

You may also want to switch PHP version :

sudo update-alternatives --config php
php -v

Restart your webserver if you are done

service apache2 restart
2
  • 2
    This answer has resolved my issue. Thanks for your help.
    – jack
    Jan 30, 2018 at 9:48
  • This fixed for me too 👍 (also updated php.ini as per other answers, and after "systemctl restart php7.3-fpm"). Only small thing is "sudo apt install php-intl php7.1-intl" also installed the php8 version as well which I did not need
    – 00-BBB
    Mar 3, 2022 at 14:20
2

Just need to clear comment before this line in php.ini file:

;extension=php_intl.dll

to

extension=php_intl.dll
2
  • After doing this change error was showing. I did follow the steps given by @maxagaz resolved my issue.
    – jack
    Jan 30, 2018 at 9:49
  • @jack in my case i added ''extension=php_intl.dll'' line in php.ini file because it was not available before then it solved this error Jun 6, 2019 at 10:05
2

If PHP version: 7.2.11
Just need to clear comment before this line in php.ini file:

;extension=intl

to

extension=intl
0

I had the same Problem, a new Magento 2.1.7 installation, php 7.0.2, mysql 5.6. in developer mode and the cronjob always send me an email with:

Class 'IntlDateFormatter' not found in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

My solution was: Both entries for the base-urls (secure und unsecure) under stores > configuration > general > web had to be the secure (https://) domain.

Now everything works fine.

0

I was stuck on this error for hours. For whatever reason I was getting this error even though I had the PHP ext intl installed and loaded. The cause for me turned out to be a files/directories permissions issue.. hope this saves someone a headache.

I ran at docroot:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

and all was well again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.