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

青灯夜游
Release: 2023-04-09 11:10:02
forward
5391 people have browsed it

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
Copy after login

An error occurred:

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

Solution:

 yum install m4
 yum install autoconf
Copy after login

Reinstall:

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

Then modify php.ini and add:

extension=zip.so
Copy after login

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!

Related labels:
php
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template