How does PHP's bzip2 compression open? Building a server environment

Source: Internet
Author: User
How does PHP's bzip2 compression open? Building a server environment

Reply content;

Found their own local development environment also did not open this extension, so practice a bit, can, steps to share out, as follows

Installing an extension-dependent system bzip2 Development Library

sudo yum install Bzip2-devel

Compile and install the ext/bz2 extension under the PHP source package directory

CD ~/php-5.6.21/ext/bz2phpize./configure--with-php-config=/usr/local/php/bin/php-configsudo make && sudo Make install

If successful, there will be a bz2.so file in a similar extension directory/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

Modifying the php.ini configuration file

sudo vim/usr/local/php/lib/php.ini


Append an extension
Extension=bz2.so
After saving, restart PHP-FPM

Then you can turn on the bzip2 extension

The above is the PHP bzip2 compression How to open it? In building the content of the server environment, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • 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.