Xampp Intl extension on windows 10 can't be installed
Asked Answered
D

3

9

I try to install Megento 2 on Xampp (php 7.2.5) and through installation process I find Intl extension installation error

enter image description here

I did every thing ;extension=intl to be extension=intl in php.ini

also I copied all files icu*.dll files from xampp/php to xampp/php/ext and to xampp/apache/pin directories and of course I restart Apache.

enter image description here

also download MSVCP110.dll and paste it to C:\Windows\System32

also checked PHP path in system variables and it is OK.

but until now the Intl extension never work

any help?

Datura answered 26/10, 2018 at 15:23 Comment(13)
tbf, I'm not sure how well M2 runs on Windows, got it set up once and was slower than anything, killing my machine. Better to set up a Linux VM (not an answer- hence the comment)Tonality
Can you put your phpinfo() list?Doucet
@JohnCho what is list?Datura
@Gouda Elalfy, please refer to php.net/manual/en/function.phpinfo.phpDoucet
dear @JohnCho I know phpinfo() but what is the list, do you want the full page output?Datura
do you have problem while running composer install ?Ormond
@Ormond yes, it was give me error that php_intl.dll doesn't exist or invalid 32 application, I tried to run composer to get the error but it doesn't appear anymore.Datura
do you have Visual C++ 2015 x86 installed?Ormond
yes, recently installed when installing odoo systemDatura
thank you @Ormond it works now, after I restart apache, so the problem in Visual C++?Datura
yes, in my system intl require thisOrmond
can I add my answer below ? :DOrmond
Of course yes, but set all steps because i will not try or test, so be careful.Datura
O
5

Xampp setup filename is contain VCXX for example xampp-win32-7.2.5-0-VC15-installer.exe, VC15 mean that PHP compiled with Visual Studio 2017, so you need to install Microsoft Visual C++ Redistributable for Visual Studio 2017 to make PHP and Extensions running smoothly, but sometime already installed VC14 or Visual C++ Redistributable 2015 is enough.

You can view list and download Visual C++ Redistributable here

Ormond answered 4/11, 2018 at 16:16 Comment(0)
D
5

Internationalization extension (further is referred as Intl) is a wrapper for » ICU library, enabling PHP programmers to perform various locale-aware operations including but not limited to formatting, transliteration, encoding conversion, calendar operations - http://php.net/manual/en/intro.intl.php

For Windows-based Server:

Make sure the php_intl.dll file exists within your php extensions directory

  • for separately installed PHP: C:\path\to\php\ext\
  • for xampp: C:\path\to\xampp\php\ext
  • (note: your drive letter might be different)

If the file exists:

  • search for the config file (php.ini, usually in the same folder as the php executable) and open it. You can find this easy by running php --ini
  • Make sure the line “extension=php_intl.dll” is existing and not commented
  • Restart the web server (usually apache)
  • Check if the extension is enabled using phpinfo(), or run php - me in cmd

If the file doesn’t exist:

  • Check your php version by running the “php -v” command
  • Download the PHP version that corresponds to yours from the PHP Downloads Page (TS/NTS, x86/x64)
    • To find thread safety for php, run: php -i | findstr “Thread” , The version that comes with xampp is usually Thread Safety => enabled.
  • Search for the php_intl.dll file in the ext folder in that version and copy it in your php\ext folder
  • Complete the steps for the case in which the file exists above.

Trouble shooting

Some web servers are confusing because they do not use the php.ini located alongside your PHP executable. To find out where your actual php.ini resides, look for its path in phpinfo(): or in cmd run php --ini

Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File:         C:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

After activating an extension, save php.ini, restart the web server and check phpinfo() again. The new extension should now have its own section.

If the extension does not appear in phpinfo(), you should check your logs to learn where the problem comes from.

If you are using PHP from the command line (CLI), the extension loading error can be read directly on screen.

If you are using PHP with a web server, the location and format of the logs vary depending on your software. Please read your web server documentation to locate the logs, as it does not have anything to do with PHP itself.

Common problems are the location of the DLL, the value of the " extension_dir" setting inside php.ini and compile-time setting mismatches.

If the problem lies in a compile-time setting mismatch, you probably didn't download the right DLL. Try downloading again the extension with the right settings. Again, phpinfo() can be of great help.

Dogged answered 2/11, 2018 at 8:27 Comment(0)
O
5

Xampp setup filename is contain VCXX for example xampp-win32-7.2.5-0-VC15-installer.exe, VC15 mean that PHP compiled with Visual Studio 2017, so you need to install Microsoft Visual C++ Redistributable for Visual Studio 2017 to make PHP and Extensions running smoothly, but sometime already installed VC14 or Visual C++ Redistributable 2015 is enough.

You can view list and download Visual C++ Redistributable here

Ormond answered 4/11, 2018 at 16:16 Comment(0)
A
3

You need change in [intl] section in php.ini file -

Change below section

________________________________

[intl]

;intl.default_locale =

; This directive allows you to produce PHP errors when some error

; happens within intl functions. The value is the level of the error produced.

; Default is 0, which does not produce any errors.

;intl.error_level = E_WARNING

;intl.use_exceptions = 0

____________________________________

To

________________________________

[intl]

intl.default_locale = en_utf8

; This directive allows you to produce PHP errors when some error

; happens within intl functions. The value is the level of the error produced.

; Default is 0, which does not produce any errors.

intl.error_level = E_WARNING

;intl.use_exceptions = 0

____________________________________

Assortment answered 29/10, 2018 at 8:8 Comment(1)
I did, but the same resultDatura

© 2022 - 2024 — McMap. All rights reserved.