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.

Recommended: "PHP Video Tutorial"
php installation bzip2
Install the system bzip2 development library that the extension depends on
sudo yum install bzip2-devel
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
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/
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
Then you can enable the bzip2 extension

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!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools






