Home > Backend Development > PHP Tutorial > ob_gzhandler' conflicts with 'zlib output compression problem in php_PHP tutorial

ob_gzhandler' conflicts with 'zlib output compression problem in php_PHP tutorial

WBOY
Release: 2016-07-13 10:55:57
Original
1096 people have browsed it

文章介绍了ob_gzhandler' conflicts with 'zlib output compression解决方法

1. output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’

PHP Warning: ob_start() [ref.outcontrol]: output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’ in yourfiles


Try replacing

 

(i.e. the code that enables zlib compression) with
 代码如下
 代码如下 复制代码
if (extension_loaded('zlib')) {
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
//header('Content-Encoding: gzip');
}
 
复制代码

if (extension_loaded('zlib')) {

$do_gzip_compress = TRUE;

ob_start();
 代码如下 复制代码
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
ob_implicit_flush(0);

//header('Content-Encoding: gzip');
}

 

 

 代码如下
复制代码
if (extension_loaded('zlib')) { ob_end_clean(); ob_start('ob_gzhandler'); }   这是因为PHP中Zlib模块设置错误造成的,将zlib.output_compression这一行注释掉就可以了。这里需要指出的是PHP5自带GZIP模块的,不需要另外加载。
http://www.bkjia.com/PHPjc/632198.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632198.htmlTechArticle文章介绍了ob_gzhandler' conflicts with 'zlib output compression解决方法 1. output handler ob_gzhandler conflicts with zlib output compression PHP Warning: ob_start() [ref...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template