2

i am using zipper to create zip file in laravel 5.3, getting the error as ,

Error: Your PHP version is not compiled with zip support

PHP version : 5.6

chmod($withdrawalFilePath, 0777);
$files = glob($withdrawalFilePath . '/*');
Zipper::make($withdrawalFilePath . '/Withdrawal.zip')->add($files)->close();
chmod($withdrawalFilePath . '/Withdrawal.zip', 0777);
u_mulder
  • 54,101
  • 5
  • 48
  • 64
Vivek Chaudhari
  • 1,930
  • 1
  • 14
  • 20

1 Answers1

3

I recently encountered this problem and was able to resolve it by intstalling the php-zip extension. Make sure you restart apache after installing the extension so that it will be loaded correctly.

I was using php 7 on an amazon ec2 instance running the amazon linux ami. The command I used was:

sudo yum install php70-zip && sudo service httpd restart

The command will be different depending on the version of php you have and which linux distribution you are using.

Lucian Buzzo
  • 31
  • 1
  • 3