so I'm downloading laravel on windows through composer and it is giving me the following error " Failed to download symfony/process from dist: The zip extension and unzip/7z commands are both missing, skipping." I googled a bit and most of the answers were to use the command " sudo apt-get install zip unzip php-zip ". But I'm using windows and I can't find any answer relating to the issue.
Asked
Active
Viewed 1.9k times
7
-
are you using wamp ? or xamp ? or laragon ? – N69S Jan 08 '23 at 18:38
-
I'm using local server – Aleef Jan 08 '23 at 18:38
-
2then lookup how to install php-zip extention manually to fix your issue – N69S Jan 08 '23 at 19:03
-
1Have you tried ensuring that you have a line like this in php.ini: `extension=php_zip.dll` ? – Lajos Arpad Jan 08 '23 at 19:22
-
Hello, facing the same problem here. @LajosArpad in my case the line in the php.ini file is listed as extension=php_zip.dll without the comment (;) Solutions that I have found online include [this](https://www.itsolutionstuff.com/post/solved-the-zip-extension-and-unzip-commands-are-both-missing-phpexample.html). The problem is that none of the solutions offer a Windows installation method. All of them are answered basing on linux based systems – OBrien Evance Jan 10 '23 at 14:47
-
@N69S all the methods online are for Linux based systems. None of them offer solutions for Windows machine – OBrien Evance Jan 10 '23 at 14:47
-
The system I am using is XAMPP – OBrien Evance Jan 10 '23 at 14:50
-
1Does this answer your question? [how can I enable PHP Extension intl?](https://stackoverflow.com/questions/33869521/how-can-i-enable-php-extension-intl) – N69S Jan 10 '23 at 15:52
-
Does this answer your question? [PHP error: "The zip extension and unzip command are both missing, skipping."](https://stackoverflow.com/questions/41274829/php-error-the-zip-extension-and-unzip-command-are-both-missing-skipping) – miken32 Aug 24 '23 at 17:53
3 Answers
49
Had the same problem too (Windows). Fixed it by;
Open the php.ini file and uncomment ;extension=zip
to extension=zip

OBrien Evance
- 704
- 5
- 18
5
https://www.php.net/manual/en/zip.installation.php#zip.installation.new.windows:
As of PHP 8.2.0, php_zip.dll DLL must be enabled in php.ini. Previously, this extension was built-in.

cmb
- 635
- 8
- 8
2
So, there are three ways to solve this problem
As mentioned by @cmb and @OBrienEvance.
Second is to use 'git bash' that has unzip command.
Third approach would be to install 7zip or another archiver
Here is how if you are on latest windows 10 or windows 11.
In PowerShell
winget install 7zip.7zip
Set its folder as environment variable after this you can use 7z command in PowerShell or in any other terminal.

Faizan Farooq
- 171
- 1
- 4