WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Warning: Cannot modify header information - headers already sent by (3 posts)

  1. anant.nigam
    Member
    Posted 2 years ago #

    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

  2. esmi
    Forum Moderator
    Posted 2 years ago #

  3. sams dolo
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic