SOLVED Bz2 not enabled in PHP Centos 7 - EA4

Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
cPanel Access Level
Root Administrator
Twitter
[[email protected] src]# yum install bzip2
Loaded plugins: fastestmirror, langpacks, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: xx.xxx.xx.xxx
* base: xxxxx.xxxxx.xxxxx.network
* epel: xxxxx.xxxxx.xxxxx.network
* extras: xxxxx.xxxxx.xxxxx.network
* updates: xxxxx.xxxxx.xxxxx.network
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Nothing to do

I can't find EasyApache 4 for bz2.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

You can verify if it's installed with commands such as:

Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -m|grep bz2
bz2
Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -i|grep bzip2
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
bzip2 compression => enabled
Also, please note the command you referenced is for the system bzip2 package, not the PHP module. Please review the following document to see how PHP modules are installed with EasyApache 4:

How to Locate and Install a PHP Version or Extension - EasyApache 4 - cPanel Documentation

Thanks!

Mod Note: Edited to reflect correct information about the bz2 package.
 

Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
cPanel Access Level
Root Administrator
Twitter
Hello,

It should be installed by default for PHP 7.0 with EasyApache 4:

Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -m|grep bz2
bz2
Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -i|grep bzip2
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
bzip2 compression => enabled
Also, please note the command you referenced is for the system bzip2 package, not the PHP module. Please review the following document to see how PHP modules are installed with EasyApache 4:

How to Locate and Install a PHP Version or Extension - EasyApache 4 - cPanel Documentation

Thanks!
[[email protected] ~]# /opt/cpanel/ea-php70/root/usr/bin/php -m|grep bz2
Code:
[[email protected] ~]# /opt/cpanel/ea-php70/root/usr/bin/php -i|grep bzip2 Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.* Stream Wrapper support => compress.bzip2:// Stream Filter support => bzip2.decompress, bzip2.compress bzip2 compression => enabled
-bash: compress.bzip2://: Is a directory
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

You can also verify it's installed via the following command:

Code:
rpm -qa|grep ea-php70-php-bz2
The output will look like this if it's installed:

Code:
# rpm -qa|grep ea-php70-php-bz2
ea-php70-php-bz2-7.0.14-1.1.1.cpanel.x86_64
If it's not, you can install it via:

Code:
yum install ea-php70-php-bz2
If your website's not detecting it, then check to see if a custom php.ini file exists under the account's document root or home directory. The custom php.ini file could be outdated, and may not include the bz2 extension.

Thank you.
 

Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
cPanel Access Level
Root Administrator
Twitter
[[email protected]~]# rpm -qa|grep ea-php70-php-bz2
[[email protected]~]# rpm -qa|grep ea-php70-php-bz2 ea-php70-php-bz2-7.0.14-1.1.1.cpanel.x86_64
grep: ea-php70-php-bz2-7.0.14-1.1.1.cpanel.x86_64: No such file or directory
[[email protected]~]# yum install ea-php70-php-bz2
[Removed Output]

Installed:
ea-php70-php-bz2.x86_64 0:7.0.14-1.1.1.cpanel

Complete!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

That shows the installation completed successfully. Can you confirm the issue is now resolved?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Nope, still same "bzip2 compression disabled (install pecl/bz2)" i'll refreshed on PHP Info.
Hello,

Please also verify if you were able to review my response about the php.ini file:

If your website's not detecting it, then check to see if a custom php.ini file exists under the account's document root or home directory. The custom php.ini file could be outdated, and may not include the bz2 extension.
Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
As i can see my WHM with EasyApache bz2 are installed PHP 7.0 and 5.6, PHP Info doesn't up.
Could you open a support ticket using the link in my signature so we can take a closer look and see why it's not working as expected?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

To update, our support team verified the bz2 module was installed on the system.

Thank you.
 
  • Like
Reactions: Samet Chan