php 国际扩展:安装 php_intl.dll

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1451468/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 02:38:39  来源:igfitidea点击:

intl extension: installing php_intl.dll

phpwindows-xpintl

提问by David

I'm trying to locate php_intl.dlland install it.

我正在尝试找到php_intl.dll并安装它。

Does anyone have any tips?

有没有人有任何提示?

采纳答案by VolkerK

The packages at http://windows.php.net/download/all contain the php\_intl.dllwhich is located in the subdir ext/.
All you have to do is to check if your extension_dirpoints to the right directory and add (or uncomment) the extension=php\_intl.dlldirective.

http://windows.php.net/download/ 上的包都包含php\_intl.dll位于 subdir 中的ext/
您所要做的就是检查您的extension_dir 是否指向正确的目录并添加(或取消注释)该extension=php\_intl.dll指令。

回答by Jeremy Warne

For the php_intl.dllextension 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
  • 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 PATHvariable in the System Variables list.

这必须在您的全局路径中,而不仅仅是您的用户路径。要设置全局路径,请转到系统信息 ( windows key + PAUSE),然后转到高级系统设置 (Vista+) 或高级 (XP),然后单击“环境变量”按钮并将适当的目录添加到PATH系统变量列表中的变量中。

回答by user2650636

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** * *.dllfiles:

2)只需复制所有icu** * *.dll文件:

from

C:\xampp\php

C:\xampp\php

to

C:\xampp\apache\bin

C:\xampp\apache\bin

Then intl extension works!!!

然后国际扩展工作!

回答by Matthew

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. I copy pasted them to the apache/bin file and tried starting apache and it finally started. On the Server Checks page it has now changed from Yellow Check to Green OK. Hope this helps.

遇到了同样的问题......我通过在我的驱动器中搜索 icu* *.dll找到了所需的文件,并找到了上面列出的文件,但在 php 文件夹中是 46 而不是 36。我将它们复制粘贴到 apache/bin 文件并尝试启动 apache,它终于启动了。在 Server Checks 页面上,它现在已从 Yellow Check 更改为 Green OK。希望这可以帮助。

回答by Max Gebert

If you read error message, "icuuc36.dll" is missing. 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. They are : icudt36.dll icuin36.dll icuio36.dll icule36.dll iculx36.dll icutu36.dll icuuc36.dll

如果您阅读错误消息,则缺少“icuuc36.dll”。问题是您的 PATH 中没有 PHP 目录,或者您可以将所有“intl”文件从 php 目录复制到 apache\bin 目录。它们是: icudt36.dll icuin36.dll icuio36.dll icule36.dll iculx36.dll icutu36.dll icuuc36.dll

回答by davedavee

For WampServer 2.5(Apache 2.4.9and PHP 5.5.12):

对于WampServer 2.5Apache 2.4.9PHP 5.5.12):

In defaultI've had php_intlenabled(you can enable it when you left click on the wamp icon in the system tray > PHP > PHP extensionsand 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,一切都很好。

回答by flog

I have PHP 5.3.1 and Apache

我有 PHP 5.3.1 和 Apache

When I add the extension=php_intl.dllto php.ini and restart apache, it comes an alert that says "the requested operation has failed"

当我将extension=php_intl.dllphp.ini添加 到 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. That solved the problem.

问题是缺少一些像 icudt36.dll 这样的 DLL(用 sysinternals ProcMon 注意到),我已经下载了 php 5.3.1 zip 版本并将所有 DLL 解压缩到 PHP 文件夹。那解决了问题。

回答by Mehdi Karamosly

I resolved this issue by adding PHP directory to PATH variable. I just appended ;C:\xampp\phpto Pathvariable in Windows Environment Variables.

我通过将 PHP 目录添加到 PATH 变量解决了这个问题。我只是附加;C:\xampp\phpPathWindows 环境变量中的变量。

回答by Johan Marchan

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. Intl extension is disabled by default.

我有 IIS 7 并在 Windows 7 上使用 Microsoft Web 平台安装程序安装了 PHP。在 IIS 中,转到设置主页中的 PHP 管理器 -> PHP 扩展 -> 启用或禁用扩展。默认情况下禁用国际扩展。

I hope this helps

我希望这有帮助

回答by Clean code

The package is already included in the extensions for PHP7.2 and above and you just need to uncomment the following line in php.ini

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

extension=intl