Install PHP ZIP Extension on Linux
PHP ZIP - This extension enables users to transparently read or write ZIP compressed archives and the files inside them. If you want to install the ZIP-PHP extension on your Linux operating system, follow the steps below.
For Red Hat-based distributions (like CentOS or Fedora):
Enable Remi using mention command.
$ sudo yum-config-manager --enable remi-php72
update the CentOS using mention command.
$ yum update
Install php zip using mention command
$ sudo yum install php-pecl-zip / sudo yum install php-zip
Ubuntu:
update the ubuntu using mention command.
$ Sudo apt-get update
Install php zip using mention command
$ sudo apt-get install php7.2-zip / sudo apt-get install php-zip
Once the installation is completed, you need to configure the php-zip extension in your PHP configuration file using the command mentioned below, and then restart the web server service.
$ sudo echo "extension=zip.so" >> /etc/php.d/zip.ini
CentOS operating system on use the command below for restart the service,
For restart the service of nginx
$ systemct restart nginx.service
For restart the service of apache:
$ systemct restart httpd.service
Ubuntu operating system on use the command below for restart the service,
For restart the service of nginx
$ systemct restart nginx.service
For restart the service of apache:
$ systemct restart apache2.service
0 Comments