How to install bzip2 in php

藏色散人
Release: 2023-03-05 20:00:02
Original
3027 people have browsed it

How to install bzip2 in php: first install the system bzip2 development library that the extension depends on; then compile and install the "ext/bz2" extension in the php source code package directory; and finally modify the "php.ini" configuration file.

How to install bzip2 in php

Recommended: "PHP Video Tutorial"

php installation bzip2

Install the system bzip2 development library that the extension depends on

sudo yum install bzip2-devel
Copy after login

Compile and install the ext/bz2 extension in the php source code 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 an extension directory like this

/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Copy after login

Modify the php.ini configuration file

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

Add an extension

extension=bz2.so
Copy after login

After saving, restart php-fpm

Then you can enable the bzip2 extension

How to install bzip2 in php

The above is the detailed content of How to install bzip2 in php. For more information, please follow other related articles on the PHP Chinese website!

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