Reputation: 256
I am developing a Wordpress website which requires zip extension to process data. But I am not able to get Zip extension working. I sought many solutions online to fix this problem, almost all of them said that I have to enable zip extension from the Cpanel of the server by changing the php version or using EasyApache from WHM. But I cannot find any of these options in my cpanel. I have also installed Archive_Zip from PHP PEAR package manager but still no luck. Following is the information about my server:
Cpanel : 4.0 (build 36), Apache Version 2.4.27, PHP Version 5.6.31
How can I solve this issue ? I have attached the picture of WHM interface please see.
Upvotes: 1
Views: 16575
Reputation: 4529
In WHM go to Software -> EasyApache4 -> Customize Profile
(applies to your current installed settings/packages). Go to PHP Extensions, select All for Page size, then enable the packages containing ZIP for all the php versions available there. Click on Next or Review, wait for WHM to prepare the packages and check the dependencies and then click on PROVISION and wait for WHM to install the required packages.
Then restart Apache (either via WHM or from the console) and you should have a working php-zip extension/module for all your installed php versions.
At the end it should look something like this:
[2017-08-23 16:52:15 +0300] info [xml-api] Service Status
[2017-08-23 16:52:15 +0300] info [xml-api] apache_php_fpm restarted successfully.
[2017-08-23 16:52:15 +0300] info [xml-api]
[2017-08-23 16:52:15 +0300] info [xml-api] Verifying : ea-php70-php-zip-7.0.22-1.1.2.cpanel.x86_64 1/3
[2017-08-23 16:52:15 +0300] info [xml-api] Verifying : ea-php56-php-zip-5.6.31-2.2.3.cpanel.x86_64 2/3
[2017-08-23 16:52:16 +0300] info [xml-api] Verifying : ea-php55-php-zip-5.5.38-23.23.3.cpanel.x86_64 3/3
[2017-08-23 16:52:16 +0300] info [xml-api] Installed:
[2017-08-23 16:52:16 +0300] info [xml-api] ea-php55-php-zip.x86_64 0:5.5.38-23.23.3.cpanel
[2017-08-23 16:52:16 +0300] info [xml-api] ea-php56-php-zip.x86_64 0:5.6.31-2.2.3.cpanel
[2017-08-23 16:52:16 +0300] info [xml-api] ea-php70-php-zip.x86_64 0:7.0.22-1.1.2.cpanel
[2017-08-23 16:52:16 +0300] info [xml-api] Finished Transaction
[2017-08-23 16:52:16 +0300] info [xml-api] Leaving Shell
Of course, that's from my cPanel dev server, in your case it might look different but that's a default cPanel/WHM install.
Upvotes: 3