Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

LIpeTuga's avatar

Class 'ZipArchive' not found

I'm trying running a project with php 7 and i got the error

Class 'ZipArchive' not found

I already tried the following command: sudo apt-get install php7.0-zip, and get always the same error "package not found"

I use the PPA: ondrej/php

Someone can help me?

P.S: Sorry the bad english.

0 likes
3 replies
willvincent's avatar

have you restarted the php process after installing the extension?

If php is running on it's own, you need to restart php-fpm, if php is running as an apache module, you need to restart apache.

1 like
wanda's avatar

hola. tengo el mismo error pero estoy en hosting compartido - estoy intentando bajar en excel un listado de una sola tabla de la base de datos -

Class 'ZipArchive' not found

es mi primer proyecto lo hice en laravel 6.0 y php 7.2 funciona perfecto en local y cuando subi al hosting me aparece este error . mi php.ini esta asi...

; cPanel-generated php ini directives, do not edit ; Manual editing of this file may result in unexpected behavior. ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) ; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)

allow_url_fopen = On allow_url_include = Off asp_tags = Off display_errors = On enable_dl = Off file_uploads = On max_execution_time = 30 max_input_time = 60 max_input_vars = 1000 memory_limit = 256M post_max_size = 8M session.gc_maxlifetime = 1440 upload_max_filesize = 2M zlib.output_compression = On

Please or to participate in this conversation.