headers already sent error

After migrating a site to another hosting server the error, ‘headers already sent’ appears for wp-content/themes/bp-social-child/bp-functions.php:218) in /home/netsysco/sites/ci-template-a/wp-includes/pluggable.php on line 875

This WordPress Codex item discusses it: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

Pluggable.php did not have ‘?>’ at the end of the file so I added it. However, the error still appears.

What else can I look for?

~eric

  • ericslangley
    • The Incredible Code Injector

    I also took a look at the WPMU BuddyPress Social theme fuctions.php file.

    It has a lot of ‘<?php’ code sections which seem to go against the recommendations in the WordPress Codex. Some of these may not have ‘?>’ but it is hard to tell there are so many, 143, though there are also 143 ‘?>’.

    From the Codex:

    DO NOT PUT CODE IN UNNECESSARY CODE BLOCKS, PUT THEM IN A SINGLE PHP BLOCK.

    Wrong:

    <?php

    some code;

    ?>

    <?php

    some other codes;

    ?>

    Correct:

    <?php

    code;

    some other code;

    ?>

  • Jack Kitterhing
    • Code Norris

    Hi there Eric,

    Hope you’re well today and thanks for your question.

    As this is a warning and not a error the site should still work correctly :slight_smile:

    Is seems like by the line number, it’s a issue in the BP social child theme line 218 in functions.php, have you added any custom code to that?

    It could be a whitespace for example, please advise :slight_smile:

    Thanks!

    Kind Regards

    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.