8

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

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

Where can I find this missing php_zip.dll?

Thanks in advance.

John Carter
  • 53,924
  • 26
  • 111
  • 144
Sasidhar Vanga
  • 3,384
  • 2
  • 26
  • 47
  • I guess previous versions of PHP shipped with `php_zip.dll`. Why they dropped this file from their zip? – Sasidhar Vanga Jul 12 '13 at 02:11
  • http://stackoverflow.com/questions/6846553/php-zip-does-not-exist-in-php-5-3-5 - php_zip is included in PHP? – Sasidhar Vanga Jul 12 '13 at 02:12
  • http://php.net/manual/en/book.zip.php You may have to install the Zip extension manually. Apparently the Windows procedure is different, so you should probably just read for yourself. Or just reinstall PHP/WAMP and see if there was something wrong with your installation to begin with. Edit: Oh wait! Lookie. Did you make sure it's checked here? (Assuming you're using WAMP) http://i.imgur.com/pUknn8p.png – Ariane Jul 12 '13 at 02:15
  • @Ariane, found that PHP 5.5 includes zip in it's core and it is enabled by default. Thanks. – Sasidhar Vanga Jul 12 '13 at 02:38
  • I saw. Glad you found a solution! – Ariane Jul 12 '13 at 02:40

2 Answers2

8

Found the Answer.

  1. Remove ;extension=php_zip.dll line in php.ini.
  2. Restart Apache HTTP Server.

Previous versions of PHP shipped with separate php_zip.dll file in ext folder. And we need to enable (comment out the ;extension=php_zip.dll line in php.ini) the zip extension manually.

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

But the line ;extension=php_zip.dll was left there in php.ini even though it is not needed.

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

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

I removed the ;extension=php_zip.dll line in php.ini.

Restarted Apache HTTP Server.

Worked fine.

Sasidhar Vanga
  • 3,384
  • 2
  • 26
  • 47
5

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

Marty McGee
  • 745
  • 8
  • 11