简体   繁体   English

PHP-缺少INTL扩展名

[英]PHP - INTL Extension missing

I am using php7 in my project. 我在我的项目中使用php7。 I have enabled intl in php.ini file by un-comment the following line. 通过取消注释以下行,我已在php.ini文件中启用了intl

;extension=php_intl.dll ; extension = php_intl.dll

Then copied ic*.dll file from php folder to apache/bin folder. 然后将ic*.dll文件从php文件夹复制到apache/bin文件夹。 Also I have checked the Environment Variables. 我也检查了环境变量。

All are correct, but still it shows error 一切正确,但仍然显示错误

PHP - INTL Extension is missing. PHP-缺少INTL扩展名。

Please help me. 请帮我。 How can i solve this. 我该如何解决。

Cause: If you have installed the unbundled PHP version, the extension is not installed on the system. 原因:如果已经安装了非捆绑的PHP版本,则该扩展名未安装在系统上。 (unless you've installed it separately) (除非您已单独安装)

If you have the bundled PHP version, the extension might be existing but not enabled. 如果您具有捆绑的PHP版本,则该扩展名可能已存在但未启用。

  • Make sure the php_intl.dll file exists within your php extensions directory 确保php扩展目录中存在php_intl.dll文件

    1. for separately installed PHP: C:\\path\\to\\php\\ext\\ 对于单独安装的PHP:C:\\ path \\ to \\ php \\ ext \\
    2. for xampp: C:\\path\\to\\xampp\\php\\ext (note: your drive letter might be different) 对于xampp:C:\\ path \\ to \\ xampp \\ php \\ ext(注意:驱动器号可能不同)
  • If the file exists: 如果文件存在:

    1. Search for the config file (php.ini, usually in the same folder as the php executable) and open it 搜索配置文件(php.ini,通常与php可执行文件位于同一文件夹中)并打开它
    2. Make sure the line “extension=php_intl.dll” is existing and not commented 确保“ extension = php_intl.dll”行存在且未注释
    3. Restart the web server (usually apache) 重新启动Web服务器(通常是apache)
    4. Check if the extension is enabled using phpinfo() 检查是否使用phpinfo()启用了扩展名
  • If the file doesn't exist: 如果文件不存在:

    1. Check your php version by running the “php -v” command 通过运行“ php -v”命令检查您的php版本
    2. Download the PHP version that corresponds to yours from the PHP Downloads Page (TS/NTS, x86/x64) 从PHP下载页面(TS / NTS,x86 / x64)下载与您相对应的PHP版本。
    3. To find thread safety for php, run: php -i | 要查找php的线程安全性,请运行:php -i | findstr “Thread” , source & more info. findstr“线程”,来源和更多信息。
    4. Search for the php_intl.dll file in the ext folder in that version and copy it in your php\\ext folder 在该版本的ext文件夹中搜索php_intl.dll文件,然后将其复制到php \\ ext文件夹中
    5. Repeat the steps for the case in which the file exists Edit: changed php7.0 occurrences with php7.x as the version may vary. 对于文件存在的情况,请重复步骤。编辑:由于版本可能不同,因此用php7.x更改了php7.0。

For more information about the solution, check link . 有关解决方案的更多信息,请检查链接

Apparently, the .dll file is missing from your system. 显然,您的系统缺少.dll文件。

Please check this link to download and install your PHP intl extension. 请检查此链接以下载并安装您的PHP intl扩展。 Also do check , whether they are pointing at the right directories. 还要检查 ,是否指向正确的目录。

Hope this will solve your problem. 希望这能解决您的问题。

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

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