Windows 版 PHP 5.5 中缺少 php_zip.dll

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17606433/
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 16:09:36  来源:igfitidea点击:

php_zip.dll is missing from PHP 5.5 for Windows

phpwindows

提问by Sasidhar Vanga

I downloaded PHP 5.5. for Windows and trying to install Composer.

我下载了 PHP 5.5。对于 Windows 并尝试安装 Composer。

Later I found that Composer need Zip extension. But php_zip.dllfile is missing from PHP 5.5 zip I downloaded from php.net website.

后来我发现 Composer 需要 Zip 扩展。但是php_zip.dll我从 php.net 网站下载的 PHP 5.5 zip 中缺少文件。

Where can I find this missing php_zip.dll?

我在哪里可以找到这个缺失php_zip.dll

Thanks in advance.

提前致谢。

采纳答案by Sasidhar Vanga

Found the Answer.

找到答案。

  1. Remove ;extension=php_zip.dllline in php.ini.
  2. Restart Apache HTTP Server.
  1. 删除中的;extension=php_zip.dllphp.ini
  2. 重新启动 Apache HTTP 服务器。

Previous versions of PHP shipped with separate php_zip.dllfile in extfolder. And we need to enable (comment out the ;extension=php_zip.dllline in php.ini) the zip extension manually.

以前版本的 PHPphp_zip.dllext文件夹中带有单独的文件。我们需要手动启用(注释掉 中的;extension=php_zip.dllphp.ini)zip 扩展名。

Latest version - PHP 5.5includes this zipsupport in core and it is enabled by default.

最新版本 -在核心中PHP 5.5包含此zip支持,默认情况下已启用。

But the line ;extension=php_zip.dllwas left there in php.inieven though it is not needed.

但是即使不需要,这条线;extension=php_zip.dll也留在了那里php.ini

As usual after installing PHP 5.5, I enabled (commented out) ;extension=php_zip.dllline in php.ini, thinking that it is a separate extension.

安装后像往常一样PHP 5.5,我启用(注释掉);extension=php_zip.dllline in php.ini,认为它是一个单独的扩展。

In this case, Composer couldn't find php_zip.dll.

在这种情况下,Composer 找不到php_zip.dll.

I removed the ;extension=php_zip.dllline in php.ini.

我删除了;extension=php_zip.dll一致php.ini

Restarted Apache HTTP Server.

重新启动 Apache HTTP 服务器。

Worked fine.

工作得很好。

回答by Marty McGee

The PHP 5.5 build for Windows that I installed from windows.php.net did not come with /ext/php_zip.dll, so I had to download the latest dll file for my Windows 8 x64 Non-Thread-Safe system and copy it into my php ext directory: http://pecl.php.net/package/zip/1.12.4/windows

我从 windows.php.net 安装的适用于 Windows 的 PHP 5.5 版本没有附带 /ext/php_zip.dll,所以我必须为我的 Windows 8 x64 非线程安全系统下载最新的 dll 文件并将其复制到我的 php ext 目录:http: //pecl.php.net/package/zip/1.12.4/windows