Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Class "ZipArchive" not found #1760

Closed
holyboly opened this issue Feb 16, 2024 · 2 comments
Closed

Class "ZipArchive" not found #1760

holyboly opened this issue Feb 16, 2024 · 2 comments

Comments

@holyboly
Copy link

Version: spatie/laravel-backup 8.6.0

Happened after composer update to the newest version.

/vendor/spatie/laravel-backup/config/backup.php

'compression_method' => ZipArchive::CM_DEFAULT,

Exception:

[2024-02-16 12:41:50] local.ERROR: Class "ZipArchive" not found {"exception":"[object] (Error(code: 0): Class \"ZipArchive\" not found at /project_dir/vendor/spatie/laravel-backup/config/backup.php:128)
[stacktrace]
#0 /project_dir/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(138): require()
#1 /project_dir/vendor/spatie/laravel-package-tools/src/PackageServiceProvider.php(33): Illuminate\\Support\\ServiceProvider->mergeConfigFrom()
#2 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(788): Spatie\\LaravelPackageTools\\PackageServiceProvider->register()
#3 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register()
#4 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(765): Illuminate\\Foundation\\ProviderRepository->load()
#5 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#6 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(263): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap()
#7 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(447): Illuminate\\Foundation\\Application->bootstrapWith()
#8 /project_dir/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
#9 Command line code(1): Illuminate\\Foundation\\Console\\Kernel->handle()
#10 {main}
"} 
@vdbelt
Copy link

vdbelt commented Feb 16, 2024

Do you have the zip extension available?

@holyboly
Copy link
Author

Yes, this code runs without problems:

Artisan::command('dev:test', function () {
    $zip = new \ZipArchive();
    $this->info('no error');
});

@spatie spatie locked and limited conversation to collaborators Feb 17, 2024
@freekmurze freekmurze converted this issue into discussion #1761 Feb 17, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants