13

I need to enable ZipArchive php class on my localhost, How can I enable it !?

iSun
  • 1,714
  • 6
  • 28
  • 57

1 Answers1

18

add extension=zip.so to your php.ini if you already have it installed (not sure what OS you're on)

Linux: pecl install zip

Restart the web server once php.ini is edited.

wesside
  • 5,622
  • 5
  • 30
  • 35
  • Using Windows 7 64bit, Also add extension=php_zip.dll; but still got the following error : Fatal error: Class 'ZipArchive' not found in E:\AppServ\www\bazaar\admin\lib\ApkArchive.php on line 10 – iSun Sep 18 '12 at 13:28
  • 3
    Then you need to download it from the pear website. Here is exactly what you need: http://www.php.net/manual/en/zip.installation.php – wesside Sep 18 '12 at 13:29
  • I copy php_zip.dll; to my root folder and ext folder but still got that error !!! Any ideas ? – iSun Sep 18 '12 at 13:54
  • you changed it to: extension=php_zip.dll right? And then restarted the web server (apache service) – wesside Sep 18 '12 at 13:55
  • That should do it. Whats your error? – wesside Sep 18 '12 at 13:59
  • actually I changed it to extension=php_zip.dll; – iSun Sep 18 '12 at 13:59
  • Fatal error: Class 'ZipArchive' not found in E:\AppServ\www\test\lib\ApkArchive.php on line 10 – iSun Sep 18 '12 at 13:59
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/16832/discussion-between-isun-and-wes) – iSun Sep 18 '12 at 14:06
  • @iSun, so chat page not found, could you tell how you enabled the ZipArchive? – Aleksey Potapov Jun 16 '13 at 09:31
  • @BraveS By helping the above post. – iSun Jun 27 '13 at 12:43
  • @iSun, :"let us continue this discussion in chat – iSun" <- page not found Or if you mean not a comment but a post - unfortunately it didn't work to me too (( – Aleksey Potapov Jul 01 '13 at 07:36
  • @BraveS It was a session between me and wesside, you can't check that page either! – iSun Jul 01 '13 at 07:42