Zipper
Zipper copied to clipboard
Call to a member function close() on string
PHP 7.2 Laravel 5.2
I already installed ZipArchive package,
this error always occur when ever I upload the zip file
Call to a member function close() on string
its working before, but suddenly its giving error
$file = $request->file('package');
$zipper = new Zipper();
$zipper->make($file)
->extractTo("uploads/some_folder", array('sidebars'), Zipper::BLACKLIST);
Maybe your PHP version is not compiled with zip support.
@eaponiente Could you solve it somehow?
This PR should throw the right exception now. After that follow these steps if your using an ubuntu distro for instance. First check for any package that corresponds to your PHP Version.
sudo apt-cache search php7*-zip
If there are some matching packages, just install them:
sudo apt-get install php-7[REPLACE THAT INCLUDING THE BRACKETS]-zip
Last but not least restart your apache if you're using one:
sudo service apache2 restart
If you were using a locale dev server then restart it:
php -S localhost:8000 -t public