Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #65175
    krojew
    Guest

    Hi,
    I found a potential problem with the W3 Total Cache plugin – even with every cache and compression options disabled after running the initial setup, data is still being compressed with gzip. This is a serious problem when using plugins which affect downloading media files – PHP caches those files in memory, rather than streaming to the client. This in turn causes large spikes in memory consumption. Is there a way to force the plugin to not enable (directly or indirectly) gzip?

    #65288
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for reaching out and I am happy to assist you with this.
    The W3 Total Cache has the option for Gzip and you can find this option in Performance>Browser Cache, in the General box for all types of files or you can enable/disable it for individual files type.
    If the Gzip compression is disabled, then the W3 Total cache does not compress any files.
    You can check this by checking the .htaccess file for any mod_deflate-related W3TC rule.
    Can you please share your settings and also share the URL so I can see if the files are indeed gzipped?
    Thanks!

    #65647
    krojew
    Guest

    The options are disabled – the act of turning on the plugin simply enabled gzip. Unfortunately, I cannot give you a link to a live website, since it serves files which can have hundreds of MB, and given the above, this can eat up server RAM quite fast. I can say I use the plugin with conjunction with the Prevent Direct Access plugin, which uses readfile() to serve files. Adding the PDA plugin file path to the ignore patterns doesn’t turn off gzip for that path too, which implies the compression is somehow implicitly enabled by W3 Total Cache.

    #65671
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for your feedback.
    Can you confirm that the problem persists if the W3TC is disabled?
    Have you confirmed that once the gzip is disabled in Performance>Browser Cache, the .htaccess rules for mod_deflate are no longer there?

    Thanks!

    #65673
    krojew
    Guest

    I can confirm enabling W3 Total Cache creates the issue, while disabling the plugin solves it. I can also confirm after enabling the plugin without enabling browser cache at all, the server started using gzip for downloading files protected by the PDA plugin. The .htaccess file in the root directory has the same size regardless if the plugin is enabled – should I look at some other .htaccess?

    #65857
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for your feedback.
    So to clarify, When W3 Total Cache is active, regardless if any option in the plugin is active or all are disabled you are still experiencing the problem?
    If this is the case, I am sorry but without knowing more about the server configuration and the website URL, I cannot share any specific instructions on how to Remedy this.
    The reason for this is that if the W3TC is installed and active, and all the settings are disabled, it means that the W3TC does not have any impact on your website.
    The W3TC uses the .htaccess in the root folder of the website. If the gzip compression is enabled for the HTML files for example you will have the following rules within the W3TC Browser cache rules block:

    <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/richtext text/plain text/xsd text/xsl text/xml
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>

    You can also see the content-encoding: gzip header.
    Tanks!

    #65866
    krojew
    Guest

    The website in question is https://anxiouscat.studio/ – I can provide you with any server information you desire.

    #66073
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for your feedback.
    I’ve checked your website and I can see the Content-Encoding: gzip header, which means that even if the W3TC is disabled, something is setting the gzip compression on a server level or any other plugin that you may be using.
    Check if the gzip compression is enabled on a server level with your host, and make sure that zlib.compression is disabled also.
    Once again, something is setting gzip compression and it’s not related to the W3 Total Cache.
    Thanks!

    #66075
    krojew
    Guest

    Right now, gzip is enabled for pages other than media files using other methods than W3TC, since the problem in question with W3TC. When W3TC is enabled, everything suddenly gets gzipped, including files served by the PDA plugin. That’s why you’re seeing gzip now for normal pages.

    #66392
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for your feedback.
    I am sorry but I am simply not able to replicate the problem. I disabled the Gzip in the Browser Cache settings and the Gzip is no longer active, therefore W3TC does not have any impact on the compression.
    Can you please let me know if the W3TC is currently enabled (I’ve checked the website and it does not seem to be active)
    Thanks!

    #66393
    krojew
    Guest

    W3TC is currently disabled, due to this issue. Have you tested this with the PDA plugin and a protected file?

    #66398
    Marko Vasiljevic
    Keymaster

    Thank you for your feedback.
    Well, I’ve checked the website and all the files are gzipped.
    can you please share what is the other method you are using for gzip? Also, share the files(pages) that are having the problem, so I can check that also.
    I’ve added this plugin, added the page to Customize “No Access” Page and this page was not compressed with gzip or br.
    Is this the plugin you are referring to?
    Thanks!

    #66401
    krojew
    Guest

    Yes, this is the plugin. If you turn on file protection on a given file in a media library, the file will not be gzipped when using the protected link, even if the rest of the whole page is. But if W3TC gets enabled, then the gzip compression will be turned on for protected links (PDA uses /private/ prefix for such files).

    #66694
    Marko Vasiljevic
    Keymaster

    Thank you for your feedback.
    Again I was not able to replicate this with this plugin.
    Are you using the paid version of the plugin with the advanced settings?
    Thanks!

    #66696
    krojew
    Guest

    No, I’m using the free version. When you download a protected file, is it streamed from readfile() or is it first cached into memory by php?

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Compression error’ is closed to new replies.