WordPress.org

Forums

WP Super Cache giving "headers already sent" error (3 posts)

  1. ibcteam
    Member
    Posted 5 years ago #

    I've been trying to implement gzip compression and minify on my site because Google said it was running too slow.

    So I installed Super Cache, but ever since I activated it, I get an error message at the top.

    Now, the site loads fine, but the error message loads first directly at the top, above the rest of the content. It's rather unsightly, and I doubt Super Cache is working.

    This is the error message:

    Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/url.com/index.php:1) in /home/*****/public_html/url.com/blog/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 74

    So it says something is conflicting with line 74 of wp-cache-phase2.php. This is what's on line 74:

    header('Vary: Cookie');

    To provide some context, this is the condition that contains that command:

    if($wp_cache_gzip_encoding)
    header('Vary: Accept-Encoding, Cookie');
    else
    header('Vary: Cookie');

    Does anyone know how to get rid of this error message, implement gzip compression AND minify onto my site? If so, I would be eternally grateful.

  2. Mowgly
    Member
    Posted 5 years ago #

    Hola espero me entiendas. Implementar el GZIP en tu sitio podria no ser la solución a que este corra lento. La funcion GZIP del WP Super Cache aumenta el consumo de memoria de tu sitio y por lo tanto podría ir más lento.

    El error que tienes podrían ser varias cosas, lo primero que te recomiendo y que es lo más facil borrar cualquier espacio en blanco al final del archivo index.php o tratar de remplazarlo con el archivo original.

    Tuve este problema con el archivo wp-setting.php se arregló cuando lo remplazé con el que viene en el package del wordpress.

    Espero te sirva

  3. vtxyzzy
    Member
    Posted 5 years ago #

    The message actually says that the output was started in index.php at line 1. This usually means you have a blank line or extra spaces at line 1 of the file.

Topic Closed

This topic has been closed to new replies.

About this Topic