Title: Cannot modify header warning
Last modified: August 20, 2016

---

# Cannot modify header warning

 *  [johneckman](https://wordpress.org/support/users/johneckman/)
 * (@johneckman)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/)
 * Getting lots of PHP Warnings on this plugin – any idea what might be going on?
 *     ```
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1503
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1520
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1521
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1523
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1524
       [Mon Jan 14 17:03:01 2013] [error] [client 67.151.141.50] PHP Warning:  Cannot modify header information - headers already sent in /wp-content/plugins/bwp-goog
       le-xml-sitemaps/includes/class-bwp-simple-gxs.php on line 1525
       ```
   
 * The actual warnings have the full path of course.
 * Doesn’t seem (so far) to be impacting the actual output
 * [http://wordpress.org/extend/plugins/bwp-google-xml-sitemaps/](http://wordpress.org/extend/plugins/bwp-google-xml-sitemaps/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3362912)
 * Hi there,
 * It’s very possible that there are other plugins that output things before the
   sitemaps get generated (a single space could cause this). How many plugins are
   you using?
 *  Thread Starter [johneckman](https://wordpress.org/support/users/johneckman/)
 * (@johneckman)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363046)
 * Well, I’m seeing the error on 3-4 different blogs, each of which are using different
   plugins.
 * I’ll have to find some time to play with enabling and disabling plugins to find
   which one might be the culprit – thanks.
 * Is that function called whenever the sitemap is requested?
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363082)
 * Which function are you referring to?
 *  Thread Starter [johneckman](https://wordpress.org/support/users/johneckman/)
 * (@johneckman)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363085)
 * All of the header warnings seem to occur inside the class-bwp-simple-gxs.php 
   in the function send_header – quick look suggests this is called anytime a new
   sitemap is generated (request comes in and sitemap isn’t in cache or cached copy
   is old?)
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363093)
 * Actually that function is called every time a sitemap is served (not generated,
   because BWP GXS has a cache mechanism).
 * So, have you had the chance to find which plugin is causing the issue?
 *  Thread Starter [johneckman](https://wordpress.org/support/users/johneckman/)
 * (@johneckman)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363094)
 * Nope. Disabled a number of plugins and it stopped showing the warning, so I thought
   I had at least narrowed the field – but then I re-enabled them all and I am still
   not seeing further warnings in the log.
 * So, I still need to determine under what circumstances it occurs – the warning
   is **not** thrown every time a sitemap gets served only some of the times, in
   a pattern I can’t yet discern.
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363095)
 * To correctly debug this you should enable BWP GXS’s debug mode (it will disable
   caching and allows you to actually see error messages).

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Cannot modify header warning’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bwp-google-xml-sitemaps_fffefe.svg)
 * [Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News)](https://wordpress.org/plugins/bwp-google-xml-sitemaps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bwp-google-xml-sitemaps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/)
 * [Active Topics](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-modify-header-warning-2/#post-3363095)
 * Status: not resolved