更新:找到问题的原因。主题是这样的
add_action(\'init\',\'ezgz_buffer\');
function ezgz_buffer()
{
ob_start(\'ob_gzhandler\');
}
如果访问者的浏览器能够处理gzip压缩,则上述代码将启用gzip压缩。
实际问题:
这对我来说真的很奇怪,我花了几个小时才弄明白。
W3 Total Cache插件已安装并处于活动状态。预览模式已禁用。页面缓存、缩小和对象缓存已启用。为页面缓存、缩小、对象缓存启用了“Degg模式”。
现在,我希望W3 Total cache能够工作并在html页面中显示调试日志,但它没有:(
站点正在加载,就像W3TC不存在一样。
检查:
- 。htaccess文件中包含了W3总缓存所需的所有规则。(漂亮的permalinks正在发挥作用。)
- wp配置。php文件具有
define(\'WP_CACHE\', true);
主题的标题中有wp\\u header()。页脚中的php和wp\\u footer()。php兼容性测试:服务器模块(&M);资源:
Plugin Version: 0.9.2.4
PHP Version: 5.3.13 (PHP5 required for Minify, Rackspace CloudFiles, Microsoft Azure support)
Web Server: Apache
FTP functions: Installed (required for Self-hosted (FTP) CDN support)
Multibyte String support: Installed (required for Rackspace Cloud Files support)
cURL extension: Installed (required for Amazon S3, Amazon CloudFront, Rackspace CloudFiles support)
zlib extension: Installed (required for compression support)
Opcode cache: Not installed
Memcache extension: Not installed
HTML Tidy extension: Not installed (required for HTML Tidy minifier suppport)
Mime type detection: Installed (Fileinfo) (required for CDN support)
Hash function: Installed (hash) (required for NetDNA purge support)
Safe mode: Off
Open basedir: On: /nfs:/tmp:/usr/local:/etc/apache2/gs-bin
zlib output compression: Off
set_time_limit: Available
mod_deflate: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_env: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_expires: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_headers: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_mime: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_rewrite: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_setenvif: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
WordPress资源_______________________/.htaccess: OK
_______________________/wp-content: OK
_______________________/wp-content/uploads/2012/06: OK
Fancy permalinks: /%year%/%monthnum%/%postname%/
WP_CACHE define: Defined (true)
URL rewrite: Enabled
Network mode: No
多次单击“emtpy all caches”(即使它似乎不起作用)。不知道怎么回事。我昨晚开始的,我甚至认为是因为我困了。所以好好睡了一觉,还是一样,不只是一场梦。
SO网友:Pothi Kalimuthu
mod_deflate: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_env: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_expires: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_headers: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_mime: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_rewrite: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
mod_setenvif: Not detected (required for Page Cache (enhanced mode) and Browser Cache)
因为这些模块都没有安装在服务器中,所以W3 Total Cache做不了什么。因此,基本上,(磁盘)增强模式下的“页面缓存”无法工作。您可以在中尝试“页面缓存”
Disk: basic 模式
不过,我不知道为什么“对象缓存”和“缩小”不起作用。