Home  >  Article  >  Backend Development  >  How to install zip module in php? (Method introduction)

How to install zip module in php? (Method introduction)

青灯夜游
青灯夜游forward
2020-07-25 17:15:135390browse

How to install zip module in php? (Method introduction)

php Install zip module

Install zip extension for php

wget http://pecl.php.net/get/zip-1.13.5.tgz
tar -zvxf zip-1.13.5.tgz
cd zip-1.13.5
/home/xxx/php/bin/phpize

An error occurred:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

Solution:

 yum install m4
 yum install autoconf

Reinstall:

/home/xxx/php/bin/phpize
./configure  --with-php-config=/home/xxx/php/bin/php-config
make
make install

Then modify php.ini and add:

extension=zip.so

Restart apache and check whether phpinfo is installed successfully

Recommended related tutorials: "PHP Tutorial"

The above is the detailed content of How to install zip module in php? (Method introduction). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete