How to enable ZipArchive on PHP 7.4

Written by James McDonald

March 30, 2020

yum 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

<?php
// enter this in a file such as phpzip.php
var_dump(class_exists('ZipArchive'));
php phpzip.php
bool(true)

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

; Enable ZIP extension module
extension=zip.so

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...