简体   繁体   English

国际扩展:安装 php_intl.dll

[英]intl extension: installing php_intl.dll

I'm trying to locate php_intl.dll and install it.我正在尝试找到php_intl.dll并安装它。

Does anyone have any tips?有没有人有任何提示?

For the php_intl.dll extension to work correctly, you need to have the following files in a folder in your PATH :为了使php_intl.dll扩展正常工作,您需要在PATH的文件夹中包含以下文件:

  • icudt36.dll
  • icuin36.dll
  • icuio36.dll
  • icule36.dll
  • iculx36.dll
  • icutu36.dll
  • icuuc36.dll

By default they're sitting in your PHP directory, but that directory isn't necessarily in your PATH (it wasn't for me, using xampp)默认情况下,它们位于您的 PHP 目录中,但该目录不一定在您的PATH中(它不适合我,使用 xampp)

This has to be in your global path, not just your user's path.这必须在您的全局路径中,而不仅仅是您的用户路径。 To set the global path, go to system info ( windows key + PAUSE ), then Advanced System Settings (Vista+) or Advanced (XP) and click the "Environment Variables" button and add the appropriate directory to the PATH variable in the System Variables list.要设置全局路径,请转到系统信息( windows key + PAUSE ),然后转到高级系统设置(Vista+)或高级(XP)并单击“环境变量”按钮并将适当的目录添加到系统变量中的PATH变量中列表。

The packages at http://windows.php.net/download/ all contain the php\_intl.dll which is located in the subdir ext/ . http://windows.php.net/download/上的软件包都包含位于子目录ext/中的php\_intl.dll
All you have to do is to check if your extension_dir points to the right directory and add (or uncomment) the extension=php\_intl.dll directive.您所要做的就是检查您的extension_dir是否指向正确的目录并添加(或取消注释) extension=php\_intl.dll指令。

I have XAMPP 1.8.3-0 and PHP 5.5.0 installed.我安装了 XAMPP 1.8.3-0 和 PHP 5.5.0。

1) edit php.ini: 1)编辑php.ini:

from

;extension=php_intl.dll

to

extension=php_intl.dll

Note: After modification, need to save the file(php.ini) as well as need to restart the Apache Server.注意:修改后需要保存文件(php.ini)并重启Apache Server。

2) Simply copy all icu* * * *.dll files: 2)只需复制所有icu* * * *.dll文件:

from

C:\xampp\php C:\xampp\php

to

C:\xampp\apache\bin C:\xampp\apache\bin

Then intl extension works!!!然后国际扩展工作!!!

Had the same issue ... I found the files needed by searching my drive for icu* * .dll and found the ones listed above but with 46 instead of 36 in the php folder.有同样的问题......我通过在我的驱动器中搜索 icu* * .dll 找到了所需的文件,并找到了上面列出的文件,但在 php 文件夹中使用 46 而不是 36。 I copy pasted them to the apache/bin file and tried starting apache and it finally started.我将它们复制粘贴到 apache/bin 文件并尝试启动 apache,它终于启动了。 On the Server Checks page it has now changed from Yellow Check to Green OK.在 Server Checks 页面上,它现在已从 Yellow Check 更改为 Green OK。 Hope this helps.希望这可以帮助。

If you read error message, "icuuc36.dll" is missing.如果您阅读错误消息,“icuuc36.dll”丢失。 The problem is that you don't have the PHP dir in your PATH, or you can copy all "intl" files from php directory to apache\bin directory.问题是您的 PATH 中没有 PHP 目录,或者您可以将所有“intl”文件从 php 目录复制到 apache\bin 目录。 They are : icudt36.dll icuin36.dll icuio36.dll icule36.dll iculx36.dll icutu36.dll icuuc36.dll它们是:icudt36.dll icuin36.dll icuio36.dll icule36.dll iculx36.dll icutu36.dll icuuc36.dll

该包已包含在PHP 7.2 及更高版本的扩展中,您只需取消注释php.ini中的以下行

extension=intl

I have PHP 5.3.1 and Apache我有 PHP 5.3.1 和 Apache

When I add the extension=php_intl.dll to php.ini and restart apache, it comes an alert that says "the requested operation has failed"当我将extension=php_intl.dll添加到 php.ini 并重新启动 apache 时,会出现“请求的操作失败”的警报

And this error on Event Monitor:而事件监视器上的这个错误:

Faulting application name: httpd.exe, version: 2.2.14.0, time stamp: 0x4ac181d6
Faulting module name: php5ts.dll, version: 5.3.1.0, time stamp: 0x4b051b35
Exception code: 0xc0000005

The problem was some DLLs like icudt36.dll were missing (noticed with sysinternals ProcMon), I've downloaded php 5.3.1 zip version and extract all DLL's to PHP folder.问题是缺少一些像 icudt36.dll 这样的 DLL(通过 sysinternals ProcMon 注意到),我已经下载了 php 5.3.1 zip 版本并将所有 DLL 解压缩到 PHP 文件夹。 That solved the problem.这解决了问题。

For WampServer 2.5 ( Apache 2.4.9 and PHP 5.5.12 ):对于WampServer 2.5Apache 2.4.9PHP 5.5.12 ):

In default I've had php_intl enabled (you can enable it when you left click on the wamp icon in the system tray > PHP > PHP extensions and check if is it marked)默认情况下,我启用php_intl (您可以left click on the wamp icon in the system tray > PHP > PHP extensions并检查它是否被标记时启用它)

To have it properly working, I've had to copy :为了让它正常工作,我不得不复制

C:\wamp\bin\php\php5.5.12\icu**51.dll C:\wamp\bin\php\php5.5.12\icu**51.dll

(total 8 files) (共 8 个文件)

to

C:\wamp\bin\apache\apache2.4.9\bin C:\wamp\bin\apache\apache2.4.9\bin

Then just restart the wamp and everything was just fine.然后重新启动 wamp,一切都很好。

您可以在终端中键入此命令: sudo apt-get install php-intl

When I faced this issue it was sorted out by using below mentioned steps:当我遇到这个问题时,它是通过使用以下提到的步骤来解决的:

Edit php.ini:编辑 php.ini:

Make制作

;extension=php_intl.dll to ;extension=php_intl.dll 到

extension=php_intl.dll Simply copy all icu* * * *.dll files(any icu file with dll extension) from extension=php_intl.dll 只需从

C:\xampp\php to C:\xampp\apache\bin C:\xampp\php 到 C:\xampp\apache\bin

Also If you have the msvcp110.dll missing file error.此外,如果您有 msvcp110.dll 丢失文件错误。 You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe.您必须下载正确的 .dll 或直接前往http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679并安装 vcredist_x64.exe 和 vcredist_x86.exe。

Now the intl extension should work :-)现在 intl 扩展应该可以工作了:-)

I resolved this issue by adding PHP directory to PATH variable.我通过将 PHP 目录添加到 PATH 变量解决了这个问题。 I just appended ;C:\xampp\php to Path variable in Windows Environment Variables.我只是将;C:\xampp\php附加到 Windows 环境变量中的Path变量。

I have IIS 7 and installed PHP using Microsoft Web Platform Installer on Windows 7. In IIS, go to PHP Manager in settings main page -> PHP Extensions -> Enable or Disable an Extension.我有 IIS 7 并在 Windows 7 上使用 Microsoft Web 平台安装程序安装了 PHP。在 IIS 中,转到设置主页中的 PHP 管理器 -> PHP 扩展 -> 启用或禁用扩展。 Intl extension is disabled by default.默认情况下禁用国际扩展。

I hope this helps我希望这有帮助

If you have the msvcp110.dll missing file error.如果您有 msvcp110.dll 丢失文件错误。 You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe, it worked for me.你必须下载正确的 .dll 或者只是去这里http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679并安装 vcredist_x64.exe 和 vcredist_x86.exe,它对我有用.

There is a better way of doing this.有一种更好的方法可以做到这一点。

I was having same kind of problem with ldap, intl, curl php extensions.我在使用 ldap、intl、curl php 扩展时遇到了同样的问题。 I've solved those issues by the following ways:我通过以下方式解决了这些问题:

At first you've to check whether these extensions have been enabled in the php.ini file by removing semicolon (;) in front of the following lines:首先,您必须通过删除以下行前面的分号 (;) 来检查这些扩展是否已在 php.ini 文件中启用:

;extension=php_intl.dll
;extension=php_ldap.dll
;extension=php_curl.dll

Now you can directly load those necessary dll files (ie libeay32, libssh2, ssleay32, icu**.dll ) from your httpd.conf (apache configuratio file) file.现在您可以直接从您的 httpd.conf(apache 配置文件)文件中加载那些必要的 dll 文件(即 libeay32、libssh2、ssleay32、icu**.dll)。 You don't have to do any other things like copying them to the apache's bin directory or php's ext directory.您不必做任何其他事情,例如将它们复制到 apache 的 bin 目录或 php 的 ext 目录。 Just add them directly in you apache's httpd.conf file.只需将它们直接添加到您的 apache 的 httpd.conf 文件中。

Please note that the followng example is for php version 5.5.x.请注意,以下示例适用于 php 版本 5.5.x。

LoadFile  "C:/php/icudt51.dll"
LoadFile  "C:/php/icuin51.dll"
LoadFile  "C:/php/icuio51.dll"
LoadFile  "C:/php/icule51.dll"
LoadFile  "C:/php/iculx51.dll"
LoadFile  "C:/php/icutest51.dll"
LoadFile  "C:/php/icutu51.dll"
LoadFile  "C:/php/icuuc51.dll"

LoadFile  "C:/php/libeay32.dll"
LoadFile  "C:/php/libssh2.dll"
LoadFile  "C:/php/ssleay32.dll"

That's it.而已。 Now, restart your apache or wamp and you're good to go.现在,重新启动您的 apache 或 wamp,您就可以开始了。

In my case adding PHP directory to PATH in user environment didn't work.在我的情况下,在用户环境中将 PHP 目录添加到 PATH 不起作用。 After some testing I've found that it should be added to system PATH (I don't know what's the name of this part of system setting windows, 'couse I have Polish Windows).经过一些测试,我发现它应该被添加到系统路径中(我不知道系统设置窗口这部分的名称是什么,因为我有波兰语窗口)。

/Digger here/ /挖掘机在这里/

Moving the icu*****.dll files to /ext/ seems to resolve the issue as well.icu*****.dll文件移动到/ext/似乎也可以解决问题。

( If you specified the extension directory to be there of course ) (当然,如果您指定了扩展目录)

In my xampp control panel, Click config to open php.ini在我的 xampp 控制面板中,单击 config 打开 php.ini

remove ;消除 ; in

;extension=php_intl.dll ;扩展=php_intl.dll

Then restart the apache.然后重启apache。

  1. Under php extensions in your wampserver, ensure intl is checked在 wampserver 中的 php 扩展下,确保选中 intl
  2. check your extension_dir in your php/v7.0/php file ensure the directory is not commented and it is accurate检查您的 php/v7.0/php 文件中的 extension_dir 确保该目录没有被注释并且它是准确的
  3. (Dont know if this contributed but i did all three)In your extension list in the same file as 2 above, include the intl file in the same format as the rest(if it is not included). (不知道这是否有贡献,但我做了所有三个)在与上述 2 相同的文件中的扩展列表中,包含与其余文件相同格式的 intl 文件(如果不包含)。 All the best一切顺利

I was having trouble getting intl to run using PHP 7.1.7 and PhpStorm on Windows 10. Based on other answers here I could tell it was a PATH/DLL dependency problem but I couldn't seem to find all of the required files even after (re-)installing the Visual C++ Redistributable.我无法让 intl 在 Windows 10 上使用 PHP 7.1.7 和 PhpStorm 运行。根据此处的其他答案,我可以说这是一个 PATH/DLL 依赖问题,但即使在之后我似乎也找不到所有必需的文件(重新)安装 Visual C++ Redistributable。

I eventually went searching my C: drive for vcr*.dll and found a copy of vcruntime140.dll in my C:\Program Files\Mozilla Firefox directory.我最终在我的 C: 驱动器中搜索 vcr*.dll 并在我的C:\Program Files\Mozilla Firefox目录中找到了 vcruntime140.dll 的副本。 So, in addition to making these changes to php.ini:因此,除了对 php.ini 进行这些更改之外:

extension_dir = "ext"
extension=php_intl.dll

I also set my runtime PATH to ONLY the PHP directory (in my case, C:\Program Files\PHP\7.1.7 ) and the Firefox directory (above) and it FINALLY worked!我还将我的运行时 PATH 设置为仅 PHP 目录(在我的情况下为C:\Program Files\PHP\7.1.7 )和 Firefox 目录(上图),它终于奏效了! I know it needs more than just the vcruntime140.dll but the other required DLLs must be in the FF directory too (there are a few dozen but I didn't bother to figure out which ones are essential).我知道它需要的不仅仅是 vcruntime140.dll,但其他必需的 DLL 也必须在 FF 目录中(有几十个,但我没有费心去弄清楚哪些是必不可少的)。

You have to modify the php.ini file by removing the semi-colon on the line containing extension=php_intl.dll您必须通过删除包含 extension=php_intl.dll 的行上的分号来修改 php.ini 文件

After this, go to the php folder of Xamp or Wamp or EasyPHP, copy every dll file containing icu*, Paste them inside your windows file.在此之后,转到 Xamp 或 Wamp 或 EasyPHP 的 php 文件夹,复制每个包含 icu* 的 dll 文件,将它们粘贴到您的 windows 文件中。

That worked for me.这对我有用。 Configuration : EasyPHP Dev Server, Windows 10.配置:EasyPHP 开发服务器,Windows 10。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM