cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Class 'IntlDateFormatter' not found in C:\xampp...

Error: Class 'IntlDateFormatter' not found in C:\xampp...

Good morning to everyone.

I installed Magento in my Windows 10 XAMPP environment, but when I try to access to it in localhost (both web page and admin page), I receive this error: "Error: Class 'IntlDateFormatter' not found in C:\xampp...".

In php.ini there is no ; before "extension=intl".

 

magento_error.png

4 REPLIES 4

Re: Error: Class 'IntlDateFormatter' not found in C:\xampp...

try running info.php file with

<?php
phpinfo();
?>

 and check if the INTL extension is loaded or not 

if not than 

try following

Edit xampp/php/php.ini and add 

extension=php_intl.dll

and restart Apache in XAMPP

you can also edit the file via Control Panel

 

NOTE: Apache restart is required. 

also if you don't have php_intl.dll in your system then try downloading it from 
https://www.dll-files.com/php_intl.dll.html

and restart apache. 

 

kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

Re: Error: Class 'IntlDateFormatter' not found in C:\xampp...

I followed your tips, but after downloading php_intl.dll from link above I didn't know where I had to extract it, so looking for Web, I put it in XAMPP/apache/bin, where I copied icu*** files, previously located in XAMPP/php dir; after that I added to php.ini "extension = php_intl".

finally I restarted Apache service, but got this exception

1 exception(s):
Exception #0 (Exception): Warning: Use of undefined constant fileDriver - assumed 'fileDriver' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\novellarredo\magento\vendor\magento\framework\View\Element\Template\File\Validator.php on line 138

Exception #0 (Exception): Warning: Use of undefined constant fileDriver - assumed 'fileDriver' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\novellarredo\magento\vendor\magento\framework\View\Element\Template\File\Validator.php on line 138
<pre>#1 Magento\Framework\View\Element\Template\File\Validator->isPathInDirectories('C:/xampp/htdocs/...', array('C:/xampp/htdocs/...')) called at [vendor\magento\framework\View\Element\Template\File\Validator.php:117]
#2 Magento\Framework\View\Element\Template\File\Validator->isValid('C:/xampp/htdocs/...') called at [vendor\magento\framework\View\Element\Template.php:270]
#3 Magento\Framework\View\Element\Template->fetchView('C:/xampp/htdocs/...') called at [vendor\magento\framework\View\Element\Template.php:303]
#4 Magento\Framework\View\Element\Template->_toHtml() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1111]
#5 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1115]
#6 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor\magento\framework\View\Element\AbstractBlock.php:675]
#7 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor\magento\framework\View\Result\Page.php:249]
#8 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#) called at [vendor\magento\framework\View\Result\Layout.php:171]
#9 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#) called at [vendor\magento\framework\Interception\Interceptor.php:58]
#10 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#)) called at [vendor\magento\framework\Interception\Interceptor.php:138]
#11 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#) called at [vendor\magento\framework\Interception\Interceptor.php:153]
#12 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#), array(array('deferJsToFooter', 'result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated\code\Magento\Framework\View\Result\Page\Interceptor.php:95]
#13 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000007d70031f000000007e1dd930#) called at [vendor\magento\framework\App\Http.php:120]
#14 Magento\Framework\App\Http->launch() called at [generated\code\Magento\Framework\App\Http\Interceptor.php:23]
#15 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\magento\framework\App\Bootstrap.php:263]
#16 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000007d700316000000007e1dd930#) called at [index.php:39]
</pre>

This is the function where the exception thrown:

protected function isPathInDirectories($path, $directories)
    {
        if (!is_array($directories)) {
            $directories = (array)$directories;
        }
        $realPath = str_replace('\\', '/',$this-fileDriver-getRealPath($path));
        foreach ($directories as $directory) {
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }
        return false;
    }

Re: Error: Class 'IntlDateFormatter' not found in C:\xampp...

Thanks a lot 

https://thuecanho123.com

Re: Error: Class 'IntlDateFormatter' not found in C:\xampp...

oh, thank you. I did it!

Website: https://alonhatro.com/cho-thue-phong-tro