Issue with zip php extention PHP 8.0

Hi there,

I’m trying to install PHP zip extention with PHP8.1, but getting this error

root@server: /usr/local/lsws/lsphp80/bin# /usr/local/lsws/lsphp80/bin/pecl install zip
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading zip-1.22.2.tgz ...
Starting to download zip-1.22.2.tgz (363,869 bytes)
..........................................................................done: 363,869 bytes
24 source files, building
running: phpize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
shtool at '/tmp/pear/install/zip/build/shtool' does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.

ERROR: `phpize' failed

Fixed with this :smiling_face_with_three_hearts:

mount -o remount,exec /tmp/
apt-get install libzip-dev
cd /usr/local/lsws/lsphp80/bin
wget http://pear.php.net/go-pear.phar
./lsphp go-pear.phar
/usr/local/lsws/lsphp80/bin/pecl install zip
echo "extension=zip.so" > /usr/local/lsws/lsphp80/etc/php.d/20-zip.ini
pkill lsphp
systemctl restart lsws
mount -o remount,noexec /tmp/

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.