1

I'm trying to install php_zip for a laravel project. I'm using Windows.

I then put this php_zip.dll inside my php/ext folder. enter image description here

I then edited my php.ini file to add this line :

extension=zip

to add zip among the existing extensions.

Still PHP tells me this when i deploy my server :

Warning: PHP Startup: Unable to load dynamic library 'zip' (tried: C:\xampp\php\ext\zip (the specified module was not found), C:\xampp\php\ext\php_zip.dll (the specified module was not found)) in Unknown on line 0
Starting Laravel development server: http://127.0.0.1:8000
[Mon Jan 25 11:50:11 2021] PHP Warning:  PHP Startup: Unable to load dynamic library 'zip' (tried: C:\xampp\php\ext\zip (the specified module was not found), C:\xampp\php\ext\php_zip.dll (the specified module was not found)) in Unknown on line 0

As we can see PHP is trying to read the proper folder and is looking for the proper file. Why is it unable to load it then ?

  • restart your server – Kamlesh Paul Jan 25 '21 at 11:06
  • The right declaration is : `extension=php_extname.dll` so in your case `extension=php_zip.dll`, then restart apache/nginx server – Fky Jan 25 '21 at 11:09
  • Yeah i tried all possible forms of the statement. The strangest part is when i follow the console link (C:\xampp\php\ext\php_zip.dll) and vscode can even open it without problem while the terminal says it can't – raphael.oester Jan 25 '21 at 11:15
  • @raphael.oester it mean is your `.dll` is not compatible with your php version download another one – Kamlesh Paul Jan 25 '21 at 11:17
  • 1
    Right... I'm running PHP 8.0.1 and the latest php_zip version is for 7.5. I have absolutely no idea how i'm going to open that zip file now – raphael.oester Jan 25 '21 at 11:27
  • There's no PHP 7.5 , what's bundled with PHP is meant to work, just make sure you're using the php_zip.dll that came with PHP and not mix and match with older versions. Also make sure the path is correct. It currently looks for extensions in directory `C:\xampp\php\ext` but this may not be the right place if e.g. you have multiple PHP versions installed – apokryfos Jan 25 '21 at 11:34
  • https://www.php.net/manual/en/zip.installation.php No reference to version 8.x, but, can you check if your version is compiled with the right option? – Sourcerer Jan 25 '21 at 11:38

1 Answers1

1

SO after php version 7.4, you must go to apache, and select php.ini after you must find extension=zip and delete the ; before extension=zip then save the config and restart your server php...and it ll be ok

helvete
  • 2,455
  • 13
  • 33
  • 37