Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Class 'ZipArchive' not found #76

Closed
stefro opened this issue Mar 4, 2016 · 8 comments
Closed

Fatal error: Class 'ZipArchive' not found #76

stefro opened this issue Mar 4, 2016 · 8 comments

Comments

@stefro
Copy link
Contributor

stefro commented Mar 4, 2016

Hi,

I've deployed a new Forge server yesterday. When I try to run php artisan backup:run I get this message:

Start backing up
Database dumped
Determining which files should be backed up...
Start zipping 31 files...

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Fatal error: Class 'ZipArchive' not found

It seems like this new Forge server does niet have all required components installed. Any idea's?

@freekmurze
Copy link
Member

It isn't installed by default for newly provisioned Forge servers. You can install it by running

sudo apt-get install php7.0-zip

I believe for that it'll be installed by default again soon.

@mansouralex
Copy link

Hello @freekmurze, What does it happen when running sudo apt-get install php7.0-zip on a forge server that's running 5.6.19 ? Thanks.

@freekmurze
Copy link
Member

I guess you should google the specific instructions for installing the zip extension on PHP5.

@redgluten
Copy link

I had to search here to fix this, it would probably be a good idea to add the extension requirement to the documentation?

Awesome work by the way, those Spatie packages are always a joy to use. 👍

@gopalkumar315
Copy link

gopalkumar315 commented Jul 22, 2017

@mansouralex I use this command for php5.6, it worked for me
sudo apt-get install php5.6-zip

@freekmurze
Copy link
Member

@redgluten it's mentioned on the requirements page: https://docs.spatie.be/laravel-backup/v4/requirements

@RaviFefar
Copy link

First Install PHP Zip Extension Bellow command:

sudo apt-get install php-zip

You are using multiple versions of PHP and you want to link the Zip extension with a specific PHP version.
Here I using the php7.3 version.

sudo apt-get install php7.3-zip

Restart Apache/Nginx Web Server

sudo systemctl restart nginx
sudo systemctl restart apache2

Now Restart PHP-FPM:

sudo systemctl restart php-fpm

@TamilTB
Copy link

TamilTB commented May 25, 2023

For Windows (-_-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants