简体   繁体   English

在PHP中启用ZLib支持

[英]Enabling ZLib support in PHP

I'm installing a PHP script in my server and when I try to run the test page, I get an error saying: 我正在服务器中安装PHP脚本,当我尝试运行测试页时,出现错误消息:

PHP needs to be compiled with ZLib support enabled (--with-zlib[=DIR])

How can I fix this on Apache? 如何在Apache上解决此问题?

I assume this is on linux? 我认为这是在Linux上?

As the error says, you need to recompile your PHP installation. 如错误所示,您需要重新编译PHP安装。

Take a look at the Makefile in the folder where you have the PHP source to see the ./configure line that was used last time, use all of the same options with the addition of --with-zlib 看一下具有PHP源代码的文件夹中的Makefile,以查看上次使用的./configure行,使用所有相同的选项并添加--with-zlib

./configure --with-zlib ...(other config options)...
make
make install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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