php中ob_gzhandler' conflicts with 'zlib output compression问题
程序员文章站
2023-12-30 16:43:52
...
文章介绍了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
代码如下 | 复制代码 |
if (extension_loaded('zlib')) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); //header('Content-Encoding: gzip'); } |
(i.e. the code that enables zlib compression) with
代码如下 | 复制代码 |
if (extension_loaded('zlib')) { ob_end_clean(); ob_start('ob_gzhandler'); } |
这是因为PHP中Zlib模块设置错误造成的,将zlib.output_compression这一行注释掉就可以了。这里需要指出的是PHP5自带GZIP模块的,不需要另外加载。
推荐阅读
-
php中ob_gzhandler' conflicts with 'zlib output compression问题
-
php文件压缩zlib.output_compression 和 ob_gzhandler,
-
php中ob_gzhandler' conflicts with 'zlib output compression问题_PHP教程
-
php文件压缩zlib.output_compression 和 ob_gzhandler,
-
php文件压缩zlib.output_compression 和 ob_gzhandler,_PHP教程
-
php中ob_gzhandler' conflicts with 'zlib output compression问题_PHP教程