• Resolved superuser

    (@moizpalitanawala)


    Sometimes when I load the website, this plugin starts sending a binary file which I think is a cache object file. This seems to be an intermittent problem and I am not able to reproduce it. It just happens sometimes.

    Here is what is displayed in the Chrome
    https://prnt.sc/ml0vmy

    On Mozilla when opening the homepage of the website, the file gets downloaded. The filename was thjLc9_o.

    If I purge all the cache, everything starts working fine again.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Can you check your wp-content/cache/ folder for any .gz files. If the cache is cleared there might not be any but check just in case.

    Thread Starter superuser

    (@moizpalitanawala)

    No, there aren’t any .gz file there right now. This problem was caused yesterday and I had cleared cache then. I have that binary file downloaded in case if you want to analyze it.

    • This reply was modified 5 years, 9 months ago by superuser.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Add the following to PgCache_ContentGrabber.php:

    if ( defined( 'W3TC_PAGECACHE_STORE_COMPRESSION_OFF' ) ) {
    			return $compressions;
    		}

    W3TC_PAGECACHE_STORE_COMPRESSION_OFF constant allows to not generate .gzip and similar files. Helps for the cases when server configuration doesn’t allow mime type overwrites so cached content ends up with browser download action.

    Also, Please make sure to add:

    define('W3TC_PAGECACHE_STORE_COMPRESSION_OFF', true);

    to wp-config.php file

    Many thanks Marko!

    Thread Starter superuser

    (@moizpalitanawala)

    Thanks, @vmarko for working out a solution for this issue. I will make the necessary changes. Just want to confirm if there is an upgrade safe way to do this? I might end up losing the changes in PgCache_ContentGrabber.php if my customer updates the plugin in the future.

    Thread Starter superuser

    (@moizpalitanawala)

    Also, where in that file do I need to write this code? I see this code is already present in
    function _get_compressions()

    • This reply was modified 5 years, 9 months ago by superuser.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Yes, it is already in line 1191.
    You just need to add:

    define(‘W3TC_PAGECACHE_STORE_COMPRESSION_OFF’, true);

    to wp-config.php file

    Thread Starter superuser

    (@moizpalitanawala)

    Okay, thank you very much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘The plugin sometimes sends a binary blob or a cache object file’ is closed to new replies.