install php-zip on PHP 5.4 Centos 7 Server
How to install php-zip on Centos Server
php-zip extension enables you to read or write zip compressed archives. Do the below steps to install php-zip extension on centos 7 server with PHP 5.4 version installed.
1. Log into your Linux server as ‘root’ user
2. Run the command ‘php -m | grep zip’ to check whether PHP zip is already installed or not
The above command will return output if extension is already installed.
3. Zip extension is provided by php-common package and it might not be installed on your server. Run the command ‘rpm -qa | grep php-common’ to check whether it is installed or not.
# yum whatprovides php-zip
php-common-5.4.16-46.el7.x86_64 : Common files for PHP
Repo : base
Matched from:
Provides : php-zip
4. You can install php-common by using yum.
Command : yum install php-common
5. Execute the command ‘php -m | grep zip’ to verify the extension is enabled.