PHP Enable bz2 extension in php.ini

I am trying to upload a file using composer in php, but the file needs to be unzipped using bzipped. Here is the error I get:

[UnexpectedValueException]                                                   
unable to decompress bzipped phar archive "/home/admin/public_html/subdo  
mains/testing4/vendor/jakoch/phantomjs/da2db411008833dfaa24e92e129aa037.bz2  
" to temporary file, enable bz2 extension in php.ini   

In my php.ini file, I added:

extension = "bz2.so" 

After adding that, I still get an error while trying to install the file.

When I run infophp (-1), I get:

bzip2 compression   disabled (install pecl/bz2)

Do I need to enable bzip2? If so, how to do it. Am I doing something wrong by allowing extension?

+4
source share
2 answers

You can easily install this php extension.

apt-get install php5.6-bz2
  • PHP (yourversion) -bz2

Source

+6
source

PHP , php.ini, PHP , bz2, pecl:

pecl install bz2

pecl pear phpize, debian, :

apt-get install php5-dev php-pear

, php.ini, - .

+3

All Articles