PHP installation Zip extension and libzip steps

Source: Internet
Author: User
This time to everyone to bring PHP installation zip extension and libzip steps in detail, PHP installation zip extension and libzip note what, the following is the actual case, take a look.

Linux:

PHP to call the \ziparchive class, you need to install a zip extension library, and zip expansion library needs to install Libzip first.

We first download:

wget Http://pecl.php.net/get/zip

Download the zip, then tar-zvxf zip, get the extracted zip-1.14.0

CD zip-1.14.0

Phpize

And then./configure to see if Libzip is missing?

If it is missing, first install Libzip,wget https://nih.at/libzip/libzip-1.2.0.tar.gz

TAR-ZXVF libzip-1.2.0.tar.gz

CD libzip-1.2.0

./configure

Make

Make install

After the installation is complete, you can install the zip. If you can't find ' zipconf.h ', look for it, you can actually find it.

Find/usr/local-iname ' zipconf.h '

But why can't you find it? OK

Ln-s/usr/local/lib/libzip/include/zipconf.h/usr/local/include. This allows you to install the zip.

Modify PHP.ini, you can call Phpinfo () to see php.ini in that path

Extension_dir = "./"

Modified to Extension_dir = "/var/zip-1.14.0/modules"

Add extension= "zip.so"

Restart Apache,httpd-k restart

Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!

Recommended reading:

thinkphp Framework User Information Query update and delete steps

PHP7.1 Internal Installation Yaf extension steps detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.