Title: PHP error log &#8211; Cannot modify header information
Last modified: February 3, 2021

---

# PHP error log – Cannot modify header information

 *  Resolved [yatgirl](https://wordpress.org/support/users/yatgirl/)
 * (@yatgirl)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-log-cannot-modify-header-information/)
 * Hi
    I am going through my php errors log and the 2 lines below have been around
   for a long time. I am trying to track them down and hopefully get them corrected.——-[
   03-Feb-2021 02:29:11 UTC] PHP Warning: Cannot modify header information – headers
   already sent in /home/*-removed-*/public_html/wp-includes/pluggable.php on line
   1299 [03-Feb-2021 02:31:12 UTC] PHP Warning: Cannot modify header information–
   headers already sent in /home/*-removed-*/public_html/wp-includes/pluggable.php
   on line 1296 ——- When I look at pluggable.php – lines 1296 and 1299 have to do
   with redirection (see below) Is this caused by the Redirection plugin ? If so,
   how do I get these errors to go away?
 *     ```
       1284		 * Filters the X-Redirect-By header.
       1285		 *
       1286		 * Allows applications to identify themselves when they're doing a redirect.
       1287		 *
       1288		 * @since 5.1.0
       1289		 *
       1290		 * @param string $x_redirect_by The application doing the redirect.
       1291		 * @param int    $status        Status code to use.
       1292		 * @param string $location      The path to redirect to.
       1293		 */
       1294		$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );
       1295		if ( is_string( $x_redirect_by ) ) {
       1296			header( "X-Redirect-By: $x_redirect_by" );
       1297		}
       1298
       1299		header( "Location: $location", true, $status );
       1300
       1301		return true;
       1302	}
       1303		endif;
       ```
   

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

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-log-cannot-modify-header-information/#post-13995500)
 * There is nothing there to indicate it is related to Redirection.
 *  Thread Starter [yatgirl](https://wordpress.org/support/users/yatgirl/)
 * (@yatgirl)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-log-cannot-modify-header-information/#post-13997859)
 * ok thanks – it mentions redirect and path to redirect to quite a few times – 
   I am at a loss then.
 *  [Marcoevich](https://wordpress.org/support/users/marcoevich/)
 * (@marcoevich)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-log-cannot-modify-header-information/#post-14018257)
 * [@yatgirl](https://wordpress.org/support/users/yatgirl/) If you haven’t solved
   this yet, the file pluggable.php is a WordPress core file, which shouldn’t be
   altered directly. The WordPress core file is not causing this issue, but merely
   showing the symptom here.
 * You can resolve this issue by disabling all your plugins and enabling them one
   by one. Then repeat the action that caused the error and check the error log 
   after you enable them. Then you will find which plugin is the cause of your issue.

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

The topic ‘PHP error log – Cannot modify header information’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Marcoevich](https://wordpress.org/support/users/marcoevich/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-log-cannot-modify-header-information/#post-14018257)
 * Status: resolved