How to enable ZipArchive?

Newbie here, I need help on enabling ZipArchive. The script that I’ve installed required this to run updates. Please help.

Thanks

1 Like

Hello @vener

ZipArchive is a class of zip extension.

You want to make sure you have PECL :: Package :: zip by following this guide [TUTORIAL] How to install any PHP modules using PEAR Package Manager. Note this php extension has no runtime configuration directives defined in php.ini

If this is CentOS 7 see this - litespeed_wiki:php:pecl-extension:lsphp74_zip [LiteSpeed Wiki]

Thanks @josephgodwinke. My VPS is hosted in Hostinger using Cyber Panel and Php 8.1 is the version that I am using. I’m not really a programmer but I will go through your recommendation and hopefully I will be able to get it working.

I’ll keep you posted.
Thanks again mate.

you’ll first need to install the necessary PHP extension and then enable it in the PHP configuration file. Here are the steps to do this:

  1. Access CyberPanel:

Log in to your CyberPanel dashboard using your admin credentials. The URL is usually in the format: https://your_server_ip:8090.

  1. Open Terminal:

Click on the “Terminal” icon in the sidebar menu to open the terminal in CyberPanel.

  1. Install ZipArchive extension:

In the terminal, you’ll need to install the PHP extension for ZipArchive. This will depend on the PHP version you’re using. Replace “XX” with the PHP version you want to install the extension for, e.g., “72”, “73”, “74”, etc.

For PHP 7.2, 7.3, or 7.4:

sudo yum install -y lsphpXX-pecl-zip

For PHP 8.0 or 8.1:

sudo yum install -y lsphpXX-zip

is not an extension its a class within zip extension.