Warning: Cannot modify header information - headers already sent by...

Hello WPMU,

I'm attempting to set up the membership plugin at my site (www.fullcoursetravel.com)...I'm on WP 3.1.3

I followed the quickstart guide and enabled the plugin...after enable, I get the following error message for my 'Visitors' that are not logged into my website.

Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-content/plugins/all-in-one-seo-pack/aioseop.class.php:221) in /home/.../wp-includes/pluggable.php on line 897

Assuming this was a glitch with 'All In One SEO', I disabled that plugin and then I get the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-content/themes/FullCourseTravel/header.php:4) in /home/.../wp-includes/pluggable.php on line 897

As long as I'm logged into the admin of wordpress I see the website fine, but when someone's not logged in, no posts or images show up besides the basic background images.

I've repaired tables inside of the plugin and they all look ok...not really sure what else to do.
If I disable the plugin, everything works fine...so it has to be an issue with how this plugin is communicating with everything else.

Any thoughts?

  • controlyours

    Here's the entire Header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <!--	<?php $tfuse_seo_meta = tfuse_seo() ?>  -->
    
    	<title><?php echo $tfuse_seo_meta['title'] ?></title>
    <!--    <meta name="keywords" content="<?php echo $tfuse_seo_meta['keywords'] ?>" />
        <meta name="description" content="<?php echo $tfuse_seo_meta['description'] ?>" />
        <meta name="author" content="ThemeFuse" />   -->
    
        <?php $template_directory = get_bloginfo('template_directory'); ?>
    
    	<script type="text/javascript" src="<?php echo $template_directory ?>/js/swfobject.js"></script>
        <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' );  ?>
        <?php wp_head(); ?>
    
        <link href="<?php bloginfo('stylesheet_url') ?>" rel="stylesheet" type="text/css" />
    	<script type="text/javascript" src="<?php echo $template_directory ?>/js/jquery-1.4.3.min.js"></script>
    	<link rel="stylesheet" href="<?php echo $template_directory ?>/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
    	<script src="<?php echo $template_directory ?>/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
    	<script type="text/javascript" src="<?php echo $template_directory ?>/js/custom.js"></script>
        <script type="text/javascript" src="<?php echo $template_directory ?>/js/jquery.nivo.slider.js"></script>
        <script type="text/javascript">
    $(window).load(function() {
    $('#slider').nivoSlider({directionNavHide:false});
    });
    </script>
    	<script type="text/javascript">
    	/* <![CDATA[ */
    	jQuery(document).ready( function($) {
    		$('.sub-menu .sub-menu > li:first-child').addClass('first');
    		$('.sub-menu > li:first-child').addClass('first-menu');
    		$('.sub-menu > li:last-child').addClass('last');
    		$('.sub-menu').addClass('level2');
    		$('.sub-menu .sub-menu').removeClass('level2');
    		$('.flickr_badge_image img').attr({width:58,height:58});
    		$('.flickr_badge_image a').attr("target","_blank");
    		$('.sub-menu').parent('.level2 li').addClass('opening');
    	} );
    	/* ]]> */
    
    	function clearAll(){
    		var frms = document.forms;
    		for(var i = 0; i < frms.length; i++) { // for each form obj
    			for(var j = 0; j < frms[i].length; j++) {
    				var input = frms[i][j]
    				inputType = input.type;
    				if(inputType == 'text' || inputType == 'textarea') {
    					input.value = "";
    				}else if(inputType == 'radio'){
    					input.checked = false;
    				}else if(inputType == 'checkbox'){
    					input.checked = false;
    				}else if(inputType == 'select-one'){
    					input.selectedIndex = -1;
    				}else if(inputType == 'select-multiple'){
    					input.selectedIndex = -1;
    				}
    			}
    		}
    	}
    	</script>
    
        <?php include( THEME_MODULES . '/count_slider_image.php' ); ?>
    
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( get_option(PREFIX.'_feedburner_url') <> "" ) { echo get_option(PREFIX.'_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>" />
        <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
        <?php
    	$custombg = get_option(PREFIX.'_custom_background');
    	if($custombg != '') {
        ?>
    		<style>
    			body{background:url(<?php echo $custombg ?>);}
    		</style>
        <?php } ?>
    
    </head>
    <body>
    <div class='root'>
    	<div class='header'>
    		<div id="site-title">
    			<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"><?php $logo = get_option(PREFIX.'_logo');  if ( $logo == '' ) { $logo = $template_directory . '/images/logo.gif'; } ?><img src="<?php echo $logo ?>" alt="<?php bloginfo('name'); ?>" /></a>
    		</div>
    		<div id="access">
    			<div class="menu-header">
                	<?php include( THEME_MODULES . '/page-nav.php' ); ?>
    				<ul class="IconsTop">
    					<?php if ( get_option(PREFIX.'_twitter')!='' ) { ?><li><a href="<?php echo get_option(PREFIX.'_twitter'); ?>" target="_blank"><img src="<?php echo $template_directory . "/images/icon_t.png"; ?>" alt="" /></a></li><?php } ?>
    					<?php if ( get_option(PREFIX.'_facebook')!='' ) { ?><li><a href="<?php echo get_option(PREFIX.'_facebook'); ?>" target="_blank"><img src="<?php echo $template_directory . "/images/icon_f.png"; ?>" alt="" /></a></li><?php } ?>
    					<?php if ( get_option(PREFIX.'_flickr')!='' ) { ?><li><a href="<?php echo get_option(PREFIX.'_flickr'); ?>" target="_blank"><img src="<?php echo $template_directory . "/images/icon_c.png"; ?>" alt="" /></a></li><?php } ?>
    				</ul>
    			</div>
    		</div>
    	</div>
  • controlyours

    This theme was created by tfuse - They put their own SEO in place...I just ripped that section out of the header as I was not using it anyway and the error message that comes up is the same one about All In One SEO:

    Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-content/plugins/all-in-one-seo-pack/aioseop.class.php:221) in /home/.../wp-includes/pluggable.php on line 897

    When I disable this plugin again, I get the same second error as listed above...even after removing the tfuse SEO info out of the header.

    It is not a plugin that I added to this theme...it was built in when I got it.

    Thanks again.

  • controlyours

    @nycwebworks,
    I only get the error when I have the membership plugin 'enabled'...and since my site is live right now, I didn't want to leave the error message up in plain site. Thank for checking for me though!

    I appreciate your compliments on the site, but I can't take full credit for it...I purchased the base theme form theme forest and then modified how it functions and customized some imagery! Much appreciated though...that's definitely the opinion I'm looking to get! :slight_smile:

  • controlyours

    Since I haven't received a response back from you, I contacted the theme designer to see if the fault was on his end...here's his reply:

    Hi,
    the problem is not from theme but from plugin. The errors you get are from pluggable.php file. The Cannot modify header information - headers already sent by ... error happen from some extra spaces in files. You need to check plugin files and see if there are no extra spaces in it. From what I saw on the topic you opened there the WPMU team didn't gave you an answer to your questions, please ask them as the problem is from the plugin for sure.

    Cheers,
    Max.

    I would love some help figuring this issue out, do you have any ideas?
    Thanks in advance.

  • imaginetek

    I am having the same issue after installing the membership plugin - would love you assistance!
    Kinda looks like the issue is with pluggable.php :slight_smile:

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 754

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 755

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 756

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 757

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 758

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 759

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 762

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 763

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 764

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 765

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 768

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 769

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2) in /home/content/i/m/a/imaginetek/html/wp-includes/pluggable.php on line 770

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/i/m/a/imaginetek/html/wp-content/themes/deadline/header.php:2)

    Thanks for your help!

  • controlyours

    Barry, I have removed all the spaces from the All In One Plugin file that's being mentioned and still no luck. I deactivate the plugin and then I get this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-content/themes/FullCourseTravel/header.php:4) in /home/.../wp-includes/pluggable.php on line 897

    I notice this error only shows up on my main gallery slider on the homepage and it hides the rest of my homepage content. If I disable this theme and re-enable it, nothing changes. If I disable the slider, I don't see the error message, but I'd like to have it showing and functional.

    I would love to get to using this plugin on this site, do you have any more suggestions or ideas. Also, the I'd like to use the All In One Plugin, as it is awesome and I have no troubles with it on my other sites.

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.