Forums

headers already sent by (4 posts)

  1. WiZeR
    Member
    Posted 4 years ago #

    Hi

    I am just setting up a new install of wordpress 2.3.2. I have chosen the theme Beautiful Sunrise 1.2 by Mark Breuer. The only moderations I have made are a new logo and change the fonts.

    For some reason when I try to make a post, I get the following error:

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

    Line 391 of pluggable.php reads header("Location: $location");

    Line 72 of functions.php reads:

    <?php

    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', '%s/images/beautiful-sunrise.jpg');
    define('HEADER_IMAGE_WIDTH', 850);
    define('HEADER_IMAGE_HEIGHT', 200);
    define( 'NO_HEADER_TEXT', true );

    function admin_header_style() {
    ?>

    I would really appreciate some help

    Thanks

  2. Adam Brown
    Member
    Posted 4 years ago #

    Could you paste the entire functions.php into http://wordpress.pastebin.ca/ ?

    You've probably got whitespace in functions.php that's causing the problem, but it's hard to say from the excerpt you posted.

  3. WiZeR
    Member
    Posted 4 years ago #

  4. Adam Brown
    Member
    Posted 4 years ago #

    The problem is here (this is lines 68 to 74):

    echo $html; } }
    ?>
    
    <?php
    
    define('HEADER_TEXTCOLOR', '');

    Delete lines 69 through 72, so that the code looks like this:

    echo $html; } }
    
    define('HEADER_TEXTCOLOR', '');

    Closing the php tags prints whitespace to the screen, which sends the headers, causing the error message you see.

Topic Closed

This topic has been closed to new replies.

About this Topic