skip to Main Content

I am getting an error like this when installing the php zip extension

I tried everything in the internet but nothing worked.

Can anyone please help me to solve this issue.
Thank you

2

Answers


  1. I faced the same issue for many days but then I tried this and I was able to get the extension installed in my Cyberpanel for PHP version 8.0.

    Edit php.ini, Login to your Cyberpanel > Edit PHP Configuration > Advanced > PHP 8.0

    Add extension=zip.so at the bottom of the document.

    and now run the commands:

    # yum install lsphp80-zip
    
    # /usr/local/lsws/lsphp80/bin/pecl install zip
    
    # killall lsphp
    
    # php -m | grep zip
    

    With this, I was able to resolve the issue and get the ZIP extension installed in my Cyberpanel. I hope this will help others as well.

    Login or Signup to reply.
  2. Follow below instructions for installing PHP extensions in CyberPanel for users who cannot find the desired extensions in the Server > PHP > Install Extensions section or in the LiteSpeed repository.

    In such cases, you can use the PEAR package manager to manage PECL 17 extensions. First, change "lsphp74" to your default PHP version and run the following commands:

    cd /usr/local/lsws/lsphp74/bin
    wget http://pear.php.net/go-pear.phar
    ./lsphp go-pear.phar
    

    Once PEAR is installed, you can install the required extension. For example, to install the latest version of the zip extension, use the following command:

    /usr/local/lsws/lsphp74/bin/pecl install zip
    

    If you need a specific version of the zip extension, you can install it using this command:

    /usr/local/lsws/lsphp74/bin/pecl install zip-1.21.1
    

    Note: Make sure to add extension=zip.so to your .php config

    Remember to replace "lsphp74" with the PHP version you have installed as the default. This should help you install the PHP extensions you need in CyberPanel.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search