lsphp74 Zip Extension Issues With CentOS 7.x

If the zip extension for lsphp74 does not exist or is not working on a CentOS 7.x system, this is because CentOS 7 comes with an old libzip library that does not support PHP 7.4.

Solution

In order to fix this issue, we need to manually compile and install the zip extension for PHP 7.4, as follows.

Install the two dependency packages:

yum install http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-0.11.2-6.el7.psychotic.x86_64.rpm

yum install http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm

Use pecl to install zip:

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

echo "extension=zip.so" > /usr/local/lsws/lsphp74/etc/php.d/20-zip.ini

Kill or restart lsphp so that the changes may take effect:

pkill lsphp