How to enable bzip2 compression in php? Building a server environment

PHP中文网
Release: 2016-08-18 09:15:47
Original
1380 people have browsed it

How to enable bzip2 compression of php? When setting up a server environment

How to enable bzip2 compression in php? Building a server environment

Reply content;

I found that my local development environment did not open this extension, so I tried it and it worked. I will share the steps as follows

Installation of extension dependencies System bzip2 development library

sudo yum install bzip2-devel
Copy after login

Compile and install the ext/bz2 extension in the php source package directory

cd ~/php-5.6.21/ext/bz2
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
sudo make && sudo make install
Copy after login

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

Modify the php.ini configuration file

sudo vim /usr/local/php/lib/php.ini
Copy after login


Add an extension
extension=bz2.so
After saving, restart php-fpm

and then You can enable bzip2 extension

How to enable bzip2 compression in php? Building a server environment

The above is how to enable bzip2 compression of php? Regarding the content of building a server environment, please pay attention to the PHP Chinese website (www.php.cn) for more related content!

Related labels:
source:php.cn
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