• Resolved yatgirl

    (@yatgirl)


    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

    (@johnny5)

    There is nothing there to indicate it is related to Redirection.

    Thread Starter yatgirl

    (@yatgirl)

    ok thanks – it mentions redirect and path to redirect to quite a few times – I am at a loss then.

    @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.