"headers already sent" error message

Hi All,

I'm using the latest version of wordpress & buddypress. When I activate WP-FB-AutoConnect plugin, I am getting the below warning message which leads to many errors as shown way below..

"The plugin generated 3472 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin."

Below is the typical error message, I am getting. Pls look into it.

Warning: Cannot modify header information - headers already sent by (output started at /home/riad/public_html/wp-content/plugins/pluginname/index.php:1) in /home/riad/public_html/wp-includes/pluggable.php on line 934

What needs to be done on these? The plugins that create problems are Invite anyone, bp group documents, wp-fb-connect.

Regards,
Siva.

  • Mason

    Hiya psivait,

    The error is displayed about 95% of the time due to extra white space in one of the PHP files. The error message is telling you it's in the file I mentioned above. The comments in that article you linked to refer to a hacked version of a timtimumb script which is not used in the bp-social theme.

    If you feel the theme is the issue then it's most likely a bad upload. Grab a new copy and try re-uploading. Otherwise, best advice is to deactivate individual plugins until you find the one causing the problem (note in the article, the original poster found extra white space in wp-settings.php). You'll have to use trial and error a bit to locate the culprit and then do a re-install or manually search for the whitespace in the files.

    Thanks!

  • dshelby

    I have a similar issue. "Headers already sent" in the BP social Theme.

    As MasonJames suggested I checked the offending file for extra space.( I assume you mean in the strings, concatenations or ULR encodings?"). With the exception of some formatting spaces in benign areas (like between functional arguments) no extra spaces were found.

    My case happens when a Member views another members (non-friend) personal page.

    I get this error with Social Theme with the option for BuddyPress "Global Privacy Setting" set to enable. I left the URL link blank.

    Warning: Cannot modify header information - headers already sent by (output started at /home/wp-content/themes/bp-social/members/single/home.php:12) in /home/wp-includes/pluggable.php on line 866

    I got the "Headers already sent" error before (when strangers viewed member information). I resolved that by changing the path to the Members page to a non-default location. Then strangers got the permissions denied and members could see other friend members pages. If I set URL link in Social media buddypress settings -- I got the "Headers already sent" all the time. Once I took out the URL it worked for strangers.

    This all leads me to believe that their are "Headers already sent" issues with the Social Theme when it wants to redirect page content to Permission denied.

    I am using membership plugin, buddyPress plugin, and Social Theme

  • camparoo

    This issue can be either plugin or theme related, so there is no guaranteed easy fix. However, I have run into this problem a few times (as I often create my own WP templates and, LOL, I am oh so not a genius programmer - just another human who makes a whole lot of mistakes).

    My theme or not, a page I often edit that can cause this error is your 'functions.php' page. As this page calls for all kinds of other WP pages, the error message you get can be quite misleading. When I am altering code I often add extra spacing to differentiate between my code and the code I am building off of. Make sure you get rid of extra spacing on your functions.php and/or custom-functions.php page(s).

    If you made a custom theme with a name that has spacing in the name without an underscore, dash, or camelCode (yes, I know - dugh - and you know how I figured this one out - by being silly enough to do it, of course), change this ( in the info on the top of your theme's style.css - the name you give your folder doesn't matter in this case - though it's a good practice to just not leave blank spaces–ever ).

    My suggestion based on experience: I work from the top down. WP is ridiculously well-tested. You may have an error with your upload, but your issue isn't specifically WordPress related. If you are blaming WP, think again. If your error message directs you to a file you have never touched, leave the file alone! If you didn't mess it up, it's fine!

    In the past, I found offending WP coding that caused my error messages and removed it to make my theme work. Oh, such a bad idea! Quite often, this same issue will cause errors with RSS feeds, so even if you remove the 'error' message, you will still have other issues if you want an active feed.

    In short, if your theme is A-OK, and you haven't screwed anything up on your own, Buddypress may not display as you want it to, but you won't get the header error message. If you get this message with a reputable theme, you prob. made a whoops (either with plug-ins or coding, or both).

    Anyway, think of this as character building. Next time you create a WP site, you'll check everything every time you add a new plug-in, edit back-end content, or change the 'functions.php' page. WordPress is almost bullet-proof, plug-ins from WPMU DEV are excellent, but I have come across serious compatibility issues on occasion ( and it would be really sweet if this site provided a "look here first" page of info on plug-ins that are not compatible ). Outside plug-ins can be questionable, and any code you have added on your own, is, well, where to start.

    Best of luck!

  • dshelby

    Thanks Camparoo.

    In my case [For this website] I am not making any code changes or customizations. This happened with straight downloads and installs of social Child theme, and WPMU plugins.

    This is a new install of WP 3.3.1 and all the active plugins and themes were gotten from WPMUdev they are Buddypress, Invite, Scheduled content, WPMU Dev Update Notifications, and Membership Plugin.

    That's it. No customizations code. Only configurations through the WP admin interface.

  • Mason

    Hiya,

    @camparoo excellent answer. I'm sending you some rep points :smiley:

    @dshelby perhaps try downloading the theme again and re-installing. If this is a brand new install you may even want to try overwriting the default WordPress files. I have seen cases where a bad upload via ftp or a file is corrupted during transfer.

    I have tried the bp social theme on several installs (and many other members here use it) so my hunch is something happened during transfer that is causing your trouble here.

    Let us know how you get on. Thanks!

  • dshelby

    Thanks

    I just got finished using the Admin update to re-install WP 3.3.1. Then manually FTP reinstalled Social theme, BuddyPress plugin and the Membership plugin.

    Still the same issue.

    Also, a correction to my previous post as I did not get buddypress plugin or wordpress from wpmudev site. I did get the others from wpmudev.org.

    Since this is a fresh install, I can will scrap it and start over. Hopefully, that will fix the issue.

  • dshelby

    I just finished fresh new install of WP 3.3.1. I set up BuddyPress, membership and Social child. WP update is the only other plugin and is active.

    I enabled Social Themes BuddyPress Privacy settings with out specifying any redirect location. I am using the default to simplify the repro.

    When I am a stranger accesses directly a Member profile page I get this error.

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/wp-content/themes/bp-social/members/single/home.php:12) in /home/content/wp-includes/pluggable.php on line 866

    In reconstructing the site I noticed I forgot to mention that before making it a Network Site I rest the WordPress Address and Site Address to https instead of http.

    Note I get this error when stranger is accessing Member Profile via Http or https.

    Any other ideas on how to get this working?

  • Richie_KS

    hi
    this issue had been track..the updates should be release soon
    meanwhile try this fix, open the error php location, in your case

    /home/content/wp-content/themes/bp-social/members/single/home.php

    <?php
    
    /**
     * BuddyPress - Users Home
     *
     * @package BuddyPress
     * @subpackage bp-default
     */
    
    ?>
    
    <?php get_header( 'buddypress' ); ?>

    edit to

    <?php
    /*
     * BuddyPress - Users Home
     *
     * @package BuddyPress
     * @subpackage bp-default
     */
    get_header( 'buddypress' ); ?>

    i think this issue need to submit to buddypress ticket since lots of plugin also affected with the white space and comment php line before header.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.