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?
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.
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.
I guess you should google the specific instructions for installing the zip extension on PHP5.
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. 馃憤
@mansouralex I use this command for php5.6, it worked for me
sudo apt-get install php5.6-zip
@redgluten it's mentioned on the requirements page: https://docs.spatie.be/laravel-backup/v4/requirements
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
sudo systemctl restart nginx
sudo systemctl restart apache2
sudo systemctl restart php-fpm
Most helpful comment
It isn't installed by default for newly provisioned Forge servers. You can install it by running
sudo apt-get install php7.0-zipI believe for that it'll be installed by default again soon.