HOW TO ENABLE ZIPARCHIVE ON PHP 7.4

Install PHP from remi

I want to install php-zip, command below

yum –enablerepo=remi install -y php-zip

From:https://toggen.com.au/it-tips/how-to-enable-ziparchive-on-php-7-4/

UBUNTU / DEBIAN

Find the extension version you want to install

12345678910# install apt-get install php7.4-zip 
# enable itphpenmod -v 7.4 zip 
# check it is enabled php7.4 -i | grep -i zip
# restart any services such as php7.4-fpm.service to pick up the changesystemctl restart php7.4-fpm.service

CENTOS

12yum install php-zip# restart Apache or php-fpm

This is on CentOS Linux release 7.7.1908 (Core)

You will know you have it installed properly when you run the following code and it returns true?

123<?php// enter this in a file such as phpzip.phpvar_dump(class_exists('ZipArchive'));
12php phpzip.phpbool(true)

On CentOS using the remi-php74 repository it add a 40-zip.ini file into /etc/php.d/ with the contents of

12; Enable ZIP extension moduleextension=zip.so