WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Warning: Cannot modify header information – headers already sent by

[Resolved] Warning: Cannot modify header information – headers already sent by

  • Hi.

    I am facing these errors when i am opening my login link: ->

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-login.php on line 348

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-login.php on line 360

    I am facing these errors when i have logged in: ->
    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-login.php on line 348

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-login.php on line 360
    
    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-includes/pluggable.php on line 668

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-includes/pluggable.php on line 669

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-includes/pluggable.php on line 670

    Warning: Cannot modify header information – headers already sent by (output started at /home/tradpump/public_html/wp-login.php:1) in /home/tradpump/public_html/wp-includes/pluggable.php on line 865

    PS:
    1. i have removed the spaced whitespaces from front and back of <? ?>
    2. in functions.php

    i replaced this code,
    function _cleanup_header_comment($str) {
    return trim(preg_replace(“/\s*(?:\*\/|\?>).*/”, ”, $str));
    }

    with this code,
    function _cleanup_header_comment($str) {
    return trim(preg_replace(“/\s*(?:\*\/|\?>).*/”, ”, $str));
    }

    because, its regex was ending my php script at this place..

    i have uploaded my
    wp-login.php file at http://pastebin.com/pqAXtEWR
    pluggable.php file at http://pastebin.com/wC1DD2KA

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    I hope it will help some one…

    in pluggable.php remove the comments after “<?php”.

    <?php /**
     * These functions can be replaced via plugins. If plugins do not redefine these
     * functions, then these will be used instead.
     *
     * @package WordPress
     */
    
    if ( !function_exists('wp_set_current_user') ) :

    to

    <?php
    if ( !function_exists('wp_set_current_user') ) :

    it resolves my issue!!! it may help you…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Warning: Cannot modify header information – headers already sent by’ is closed to new replies.