• Resolved ultramegaok1988

    (@ultramegaok1988)


    When I go to publish a blog, I get the following error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/crasbae2/public_html/wp-content/themes/beautifulsunrise/functions.php:72) in /home/crasbae2/public_html/wp-includes/pluggable.php on line 331

    My site is: https://www.crashburnalley.com

    It published, but not to my main page. It just appears here:

    https://crashburnalley.com/?p=3

    And I can’t add categories without getting a similar message.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The theme you’re using (beautifulsunrise) has extra blank lines in its functions.php file. Probably at the bottom. Remove any and all spaces or blank lines after the final “?>” in that file. functions.php must produce NO OUTPUT or you get that sort of error.

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    I don’t think there are any spaces. I put it in Word where it shows all of the spaces and line breaks and I didn’t see anything out of the ordinary.

    Would you like me to post the code?

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    The error also occurs when you click the RSS feed link.

    https://crashburnalley.com/

    It’s at the bottom of the right hand column.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    I don’t think there are any spaces.

    I really wasn’t asking you if there are any spaces. I’m telling you that there absolutely *are* spaces or linefeeds or some other sort of blank space. They’re on line 72. The error message itself tells you exactly what is wrong, if you know how to read it.

    Your functions.php file in your theme is broken because of these. It’s as simple as that.

    If you can’t fix it, use another theme.

    Oh, and do not use Word. Use a text editor, like TextPad or even Notepad. Word is not a text editor.

    Otto42 knows stuff. ??

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    Yeah, I’m not familiar with PHP.

    I use TextPad as my HTML/CSS editor.

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    With this error:

    /home/crasbae2/public_html/wp-content/themes/beautifulsunrise/functions.php:72) in /home/crasbae2/public_html/wp-includes/pluggable.php on line 331

    I’m going to the file and the exact line and I don’t see extra spaces.

    Line 72 of functions.php:

    $dateformatstring = ‘ ‘.$dateformatstring;

    The code around it:

    $datemeridiem_capital = $wp_locale->get_meridiem(date('A', $i));
    		$dateformatstring = ' '.$dateformatstring;
    		$dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring);

    Line 331 of pluggable.php:

    header(“Location: $location”);

    The code around it:

    else {
    		if ( php_sapi_name() != 'cgi-fcgi' )
    			status_header($status); // This causes problems on IIS and some FastCGI setups
    		header("Location: $location");
    	}

    Go to your theme directory and open each .php file. Go to the bottom and make sure that it ends with a ?> and *nothing* else.
    You likely have a carriage return or space after the final ?>

    You have reading difficulties, my friend: You were given the exact answer, you just have to carefully read it instead of arguing and posting irrelevant code!
    The answer was:

    The theme you’re using (beautifulsunrise) has extra blank lines in its functions.php file.

    Not WP’s own wp-includes/functions.php but the functions file in your theme folder.

    The error message you posted in bold in your OP says it clearly:
    wp-content/themes/beautifulsunrise/functions.php:72)

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    I’m not arguing at all. I just have never used PHP before and I don’t understand it. I appreciate your help and patience.

    Thanks for the clarification.

    Well php is like the Marine Corps. When we say no blank lines after that last php thing we mean it. No carriage return, no space, no period. Nothing.

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    Okay, so I’m getting this error too:

    Warning: Cannot modify header information – headers already sent by (output started at /home/crasbae2/public_html/wp-content/themes/beautifulsunrise/functions.php:72) in /home/crasbae2/public_html/wp-login.php on line 12

    I’m in that file — wp-login.php — and Line 12 has this:

    header('Content-Type: '.get_bloginfo('html_type').';

    Now, there is a space after that semicolon. Should I erase that? When I do, this becomes attached to the semicolon:

    charset='.get_bloginfo('charset'));

    Sorry for my PHP ignorance, I didn’t think I’d have to use it. ??

    What is a carriage return, by the way?

    Could you reinstall from the svn? The zip has been a bit hit and miss lately.

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    svn?

    And do you mean a zip file?

    I guess I could try a reinstall from the zip file I downloaded. I don’t know what svn is.

    Thread Starter ultramegaok1988

    (@ultramegaok1988)

    Ahhh…….

    I reinstalled and now I can’t even access my wp-login page.

    Warning: Cannot modify header information – headers already sent by (output started at /home/crasbae2/public_html/wp-content/themes/bsunrise/functions.php:72) in /home/crasbae2/public_html/wp-login.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /home/crasbae2/public_html/wp-content/themes/bsunrise/functions.php:72) in /home/crasbae2/public_html/wp-includes/pluggable.php on line 331

    This = frustrating. You have to be a web design genius to do this stuff.

    This is the theme I downloaded:

    https://themes.wordpress.net/columns/2-columns/3534/beautiful-sunrise-10/

    Could you download it and check the file — maybe it’s the file that’s wrong, not my installation. It’s all gibberish to me.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘What does this mean?’ is closed to new replies.