Install php-zip extension centos 7

I am trying to install ziparchive and domdocument on nginx web server that has the latest WordPress. In order to run Avada theme, I need these two on the local CentOS 7 test server. I am searching for an answer for the past 3 days. What shoud I do?

Here is a partial list of "yum list installed:"

php-common.x86_64                   7.2.3-2.el7.remi               @remi-php72
php-fpm.x86_64 7.2.3-2.el7.remi @remi-php72
php-json.x86_64 7.2.3-2.el7.remi @remi-php72
php-mysqlnd.x86_64 7.2.3-2.el7.remi @remi-php72
php-pdo.x86_64 7.2.3-2.el7.remi @remi-php72
php72.x86_64 1.0-1.el7.remi @remi-safe
php72-php-cli.x86_64 7.2.3-2.el7.remi @remi-safe
php72-php-common.x86_64 7.2.3-2.el7.remi @remi-safe
php72-php-json.x86_64 7.2.3-2.el7.remi @remi-safe
php72-php-mbstring.x86_64 7.2.3-2.el7.remi @remi-safe
php72-php-pear.noarch 1:1.10.5-6.el7.remi @remi-safe
php72-php-process.x86_64 7.2.3-2.el7.remi @remi-safe
php72-php-xml.x86_64 7.2.3-2.el7.remi @remi-safe
php72-runtime.x86_64 1.0-1.el7.remi @remi-safe
unzip.x86_64 6.0-16.el7 @base

Rahul

17.9k7 gold badges40 silver badges58 bronze badges

asked Mar 31, 2018 at 3:17

php-json.x86_64 7.2.3-2.el7.remi @remi-php72

php72-php-json.x86_64 7.2.3-2.el7.remi @remi-safe

Looks like your installation is a mess, you have installed half of the php- packages (base packages) and half of the php72-php- (SCL packages)

Read the FAQ about Difference between php-* and php##-php-* packages ?

php-fpm.x86_64 7.2.3-2.el7.remi @remi-php72

As you are using FPM as base package from remi-php72, you need zip extension from the same repository (which is probably not enabled, chech with yum repolist)

Drop the unneeded packages

yum remove php72\*

As explained by the wizard, enable the repository permanently to ensure all extensions will be pulled from it

yum-config-manager --enable remi-php72
yum install php-pecl-zip

echo "extension=zip.so" >> /etc/php.d/zip.in

Never do this, each package provides its configuration file to enable the provided extension.

answered Apr 3, 2018 at 6:32

Install php-zip extension centos 7

Remi ColletRemi Collet

5,7511 gold badge19 silver badges24 bronze badges

1

try yum search zip |grep -i php and install with package name came back

answered Mar 31, 2018 at 4:06

Install php-zip extension centos 7

tringuyentringuyen

7415 silver badges5 bronze badges

4

This method works for me: First type: yum search zip |grep -i php then it will appear you all modules related to ZIP extensions with various of PHP version like so:

ea-php54-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php55-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php56-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php70-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php71-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php72-php-zip.x86_64 : A module for PHP applications that need to handle .zip
ea-php73-php-zip.x86_64 : A module for PHP applications that need to handle .zip

select whatever version you working with by: yum install ea-php72-php-zip.x86_64 finally, restart the Apache through service httpd restart

answered Mar 29, 2020 at 19:37

Install php-zip extension centos 7

Imad OulhouImad Oulhou

1512 silver badges7 bronze badges

You can try: yum install php-pecl-zip.x86_64

Try installing that and enabling it by running: echo "extension=zip.so" >> /etc/php.d/zip.ini

answered Mar 31, 2018 at 3:34

Install php-zip extension centos 7

tringuyentringuyen

7415 silver badges5 bronze badges

2

I was able to resolve this issue via the following:

yum install yum-utils
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install remi-release-7.rpm
yum-config-manager --enable remi-php72
yum install php72-php-pecl-zip
echo "extension=/opt/remi/php72/root/usr/lib64/php/modules/zip.so" >> /etc/php.d/zip.ini

The issue was due to using the remi repo which doesn't place the module in one of the default locations PHP expects. Setting the absolute path to zip.so in the extension variable under /etc/php.d/zip.ini fixes the issue.

You can find the location of zip.so on your system via the following if the above path doesn't work:

updatedb
locate zip.so

answered Jan 8, 2020 at 18:59

Install php-zip extension centos 7

BananaBanana

1392 silver badges5 bronze badges

1

This worked for me!

yum install php-pecl-zip
apachectl restart

Install php-zip extension centos 7

Jared Forth

1,5175 gold badges18 silver badges30 bronze badges

answered Aug 4, 2020 at 21:57

Install php-zip extension centos 7

try yum search zip |grep -i php and install with package name came back

like - sudo yum install ea-php73-php-zip.x86_64

answered Jul 25, 2020 at 18:56

Install php-zip extension centos 7

How do I install a zip file extension?

Install Chrome extension from file Vision RPA Selenium IDE. In the case of Kantu, you can get the older version directly from the archive. So the process starts with the Chrome extension as ZIP archive. Step 2: Select "Load Unpacked" (extension) and point it to the extension folder - and you are done!

How do I fix PHP zip extension is not loaded?

This error indicates an incompatibility with PHP on your server and the latest update to Elementor. To solve it, please ensure the PHP version is 7.4 or 7.5 (not 7.3 or 8) on your server. Additionally, ensure the zip extension for PHP is installed.

What is PHP zip extension?

The PHP Zip files functions are used to stores the bunch of files or directory together in the compressed. The Zip is the archive file format that is used to stores the files in compressed form.

How do I install PHP extensions?

How To Compile And Install PHP Extensions From Source.
Install the PHP development package. On Ubuntu/debian, you can use apt-get, it's a piece of cake. ... .
Download & unzip the PHP5 source code. ... .
Prepare the extension (phpize) ... .
Configure & Make the extension. ... .
Move the extension. ... .
Edit your PHP. ... .
Restart your php..