Bobcares

How to enable PHP zip extension in cPanel

by | Apr 27, 2020

Are you looking to enable PHP zip extension in cPanel? We can help you.

PHP websites using zip files needs zip extensions for data processing.

At Bobcares, we receive requests to enable PHP zip extensions as a part of our Server Management Services.

Today, let’s see how our Support Engineers enable PHP zip extension in cPanel.

 

Why do we need the PHP zip extension?

Website owners always look for ways to optimize website files. Zipping is one way to reduce file size.

A zip archive file format supports lossless data compression, thereby making it suitable for sending and storing data.

If websites use a zip file format, it needs a zip extension to process it. That is, zip extension allows the users to read and write into the zip files.

Now, let’s see how our Support Engineers enable PHP zip extensions in cPanel.

 

How to enable the PHP zip extension in cPanel?

1. Firstly, we log into cPanel and click on the PHP PEAR Packages available under the SOFTWARE section. The icon appears as in the image.

Enable PHP zip extension cPanel

2. Then we type zip in the search bar, and Archive_Zip will be available. Here, we click on the install icon.

3. After installing Archive_Zip, we go to the previous step and click the Select PHP Version icon.

4. Now, the Archive_Zip is visible here. Click the checkbox of the zip extension. And hit the save button to add the Archive_Zip to the current PHP version. This would install the PHP Zip extension.

 

How to enable PHP zip extension in WHM?

Zip extension is a very basic requirement for websites nowadays. So we enable it in all the servers we manage. Let’s see how we enable it via WHM.

Initially, we login to WHM and navigate as follows,

Software >> EasyApache 4 >> Customize >> PHP extensions. Here we search for zip and enable phpx.x-php-zip for all versions. Finally, we click on Review and Provision.

This enables the zip extension for all the PHP websites in the server.

 

Common errors while enabling PHP Zip extension

Now, let’s see a few common errors our customers reported to us while enabling the PHP zip extension.

 

1. Missing library

Recently, one of our customers approached us with the below error message

PHP ZipArchive Library is missing or disabled

Our Support Engineers checked the current PHP version using the command,

php -v

He used CentOS 6 with Apache and PHP 7.0. The PHP 7 provides a php7.0-zip package. We installed it using the command,

yum install php7.0-zip

We used the below command to check the libraries,

yum list installed | grep -i php

Lastly, we ran the below command to restart Apache,

service httpd restart

Finally, this fixed the error.

 

2. Installation command error

The PHP zip extensions can be enabled through commands as well. So, few customers try to install it via commands itself. But mistakes in the command lead to errors.

Here is an example where the customer experienced an error due to incorrect command.

The customer received the error Class ZipExtension not found. He was using CentOS 7 and PHP 7.0.27.

Our Support Engineers checked the command he used. The command was,

yum install php70-php-pecl-zip

The actual package was php-pecl-zip.x86_64. So we installed it using the command,

yum install php70-php-pecl-zip.x86_64

And then, we enabled it by running the command,

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

This fixed the error and the PHP extension was enabled.

 

[Need assistance in enabling the PHP extension? – We’ll help you.]

 

Conclusion

In short, PHP websites using zip files require zip extensions for data processing. Today, we saw how our Support Engineers enabled PHP zip extension in cPanel.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

5 Comments

  1. Suprabha Dey

    Thanks for the easy instruction. I easily did it!

    Reply
  2. K. Selvakumar

    It is workiing, Great Explaination. Thank you

    Reply
    • Hiba Razak

      Hi,
      Glad to know that our article helps you solves the issue ? .

      Reply
  3. Sue Richards

    Struggling with step 3 and 4 of cpanel as those options are not there.

    Reply
    • Hiba Razak

      Hi,
      Please contact our support team via live chat(click on the icon at right-bottom)

      Reply

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF