To install, download the zip file from the URL : http://pecl.php.net/package/zip
#cd /usr/local/src
#wget http://pecl.php.net/get/zip-1.12.4.tgz
#tar -xvzf zip-1.12.4.tgz
#cd zip-1.12.4
Now install using the phpize utility.
#phpize --> Which generate ./configure file
#./configure --enable-zip --with-php-config=/usr/local/php-5.2.17/bin/php-config (Custom PHP Config File location)
#make
#make install
Open the php.ini of the custom PHP, in my case, it will be,
#/usr/local/php-5.2.17/bin/php -i | grep php.ini
#vim /usr/local/php-5.2.17/lib/php.ini
>> and add extension=zip.so
Verify zip from phpinfo page or using the command
#/usr/local/php-5.2.17/bin/php -m | grep zip
zip
Done
#cd /usr/local/src
#wget http://pecl.php.net/get/zip-1.12.4.tgz
#tar -xvzf zip-1.12.4.tgz
#cd zip-1.12.4
Now install using the phpize utility.
#phpize --> Which generate ./configure file
#./configure --enable-zip --with-php-config=/usr/local/php-5.2.17/bin/php-config (Custom PHP Config File location)
#make
#make install
Open the php.ini of the custom PHP, in my case, it will be,
#/usr/local/php-5.2.17/bin/php -i | grep php.ini
#vim /usr/local/php-5.2.17/lib/php.ini
>> and add extension=zip.so
Verify zip from phpinfo page or using the command
#/usr/local/php-5.2.17/bin/php -m | grep zip
zip
Done