Solved: PHP Fatal Error Class ‘locale’ Not Found in Magento 2
Magento 2 installing is simple ain’t it!
And if you are a novice for Magento 2, errors and warnings can be scary.
Today, I’ll post the solution for the error that says,
Fatal error: Class ‘Locale’ not found in C:\xampp2\htdocs\mag236s\vendor/magento/framework/Locale/Bundle/DataBundle.php
You may face this error while installing Magento 2.3.5 or above versions using XAMPP.
The error occurs because Xampp does not include the php.ini file by default. The file resides in the root directory of Xampp.
Magento 2.3.5 and higher versions require “intl” extension so the only solution is to enable the extension from php.ini file.
Check the steps to avoid this error and install Magento 2 without any problem:
Solution for PHP Fatal Error Class ‘locale’ Not Found in Magento 2:
- Open <php.ini> file and find the line ;extension=php_intl.dll or ;extension=intl.
- Remove (;) from there and save the file.
- Restart Xampp or Wamp server and refresh the installation page.
That’s it.
Similar error may occur in the newer versions of Magento 2 as the Zend Framework has been deprecated. Learn here to solve ‘main.CRITICAL: Error: Class Zend_Json not found’ in Magento 2.
Queries regarding this error? Feel free to ask in the Comments section below.
I would be glad to help you out.
Do share this post with Magento Community via social media.
Thank you.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Get Product URL for Specific Store in Magento 2
How to Change Order Status Programmatically in Magento 2
Next