How to enable bzip2 compression of php? When setting up 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
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
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
Add an extension
extension=bz2.so
After saving, restart php-fpm
and then You can enable bzip2 extension
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!