简体   繁体   中英

How to enable bzip2 support in PHP 7

I have an application that needs bzip2 support. I have installed the library, but I can't figure out how to enable it. By default it's disable in PHP.

I have searched the internet the whole day, but I can't get it to work. I am running on Debian 8 (Jeezy) and PHP 7. Any help is appreciated!

您可以简单地安装它。

apt install php7.0-bz2

According to the PHP manual, the bzip2 extension is not enabled by default (as you stated)

Bzip2 support in PHP is not enabled by default. You will need to use the --with-bz2[=DIR] configuration option when compiling PHP to enable bzip2 support.

See here

According to this quote you'll have to compile PHP by yourself in order to enable bzip2 support. Surely there are plenty of resources on the net on how to compile PHP (eg here ). Anyway, compiling it by yourself may not be suitable for a beginner like you are. You can surely give it a shot (you'll learn a lot), but it'll be way easier, if you have access to some kind of Linux expert.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM