Php nginx fpm gzip压缩不工作

Php nginx fpm gzip压缩不工作,php,ubuntu,nginx,Php,Ubuntu,Nginx,我已经用php fpm+opcache配置了nginx(可能是opcache的问题,但我对此表示怀疑)。 因此: phpinfo()输出: Firebug响应标题: Connection Keep-Alive Content-Type application/json;charset=utf-8 Date Wed, 16 Apr 2014 09:37:54 GMT Proxy-Connection Keep-Alive Server nginx/1.4.1 (Ubuntu)

我已经用php fpm+opcache配置了nginx(可能是opcache的问题,但我对此表示怀疑)。 因此:

phpinfo()输出:

Firebug响应标题:

Connection  Keep-Alive
Content-Type    application/json;charset=utf-8
Date    Wed, 16 Apr 2014 09:37:54 GMT
Proxy-Connection    Keep-Alive
Server  nginx/1.4.1 (Ubuntu)
Transfer-Encoding   chunked
Vary    Accept-Encoding
Via 1.1 MSFWX
x-powered-by    PHP/5.5.3-1ubuntu2.2
PS application/json由头文件和gzip_类型支持,我猜是一个opcache模块(最近启用,在gzip停止运行之后)因为将php代码的编译位放入RAM中而从不gzip它。我应该现在通过ob\u start(“ob\u gzhandler”)启动它吗?

好的,现在它工作正常了。 解决方案:这是因为fpm模块-您需要

kill -9 <every fpm process> 
在系统上测试PS

PHP 5.5.3-1ubuntu2.2 (cli) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

我希望这会对某人有所帮助。

响应有多大?
kill -9 <every fpm process> 
service php5-fpm restart
PHP 5.5.3-1ubuntu2.2 (cli) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies