• Some background about my site…
    https://www.<mainsite>.com :-
    Custom site written in PHP. Includes a wp-blog-header.php about midway into the index page to display some posts from our wordpress site. To prevent caching, the index.php begins with defining the DONOTCACHEPAGE constant.
    https://www.<mainsite>.com/content/ :-
    Full WP site using a theme called “Magazinly”. WP Super Cache has been activated. WP Super Cache Compression is disabled, since GZIP compression is already in place.

    Problem Description:-
    I’m aware why the “cannot modify header” warning is being issued. My index page begins rendering well before wp-blog-header is included. The actual attempt at modifying the header happens inside wp-cache-phase2.php at line 91, which is of WP Super Cache. My expectation is that since my file has been excluded from any kind of caching, why should Super Cache even try and modify any headers? Is there any way for me to prevent it from doing so?

    Here’s a sample of the PHP Warning along with stack trace…
    E_WARNING: Cannot modify header information – headers already sent by (output started at /var/www/html/web/featuredExperts.php:15)

    Stack trace…
    …at /var/www/html/content/wp-content/plugins/wp-super-cache/
    wp-cache-phase2.php (91)
    …at /var/www/html/content/wp-content/plugins/wp-super-cache/
    wp-cache-phase1.php (346)
    in wp_cache_postload called at /var/www/html/content/wp-settings.php (227)
    in require_once called at /var/www/html/content/wp-config.php (96)
    in require_once called at /var/www/html/content/wp-load.php (29)
    in require_once called at /var/www/html/content/wp-blog-header.php (12)
    in include called at /var/www/html/web/blogcontent.php (3)
    in include_once called at /var/www/html/web/homepage.php (39)
    in include_once called at /var/www/html/web/index.php (169)

    Any help will be most appreciated! Thanks in advance!

    https://www.ads-software.com/plugins/wp-super-cache/

  • The topic ‘"Cannot modify header…" warning on custom page thats excluded from caching’ is closed to new replies.