WordPress.org

Ready to get started?Download WordPress

Forums

Why would only some people get :Warning: Cannot modify header information (2 posts)

  1. dragonsjaw
    Member
    Posted 4 years ago #

    2.8.4

    The site and back end work fine for me, on several computers with several browsers.
    Some users are saying they are getting the dreaded:

    'Warning: Cannot modify header information - headers already sent by (output started at /home/siteword/public_html/wp-content/themes/patagonia/main.php:8) in /home/siteword/public_html/wp-content/themes/patagonia/header.php on line 2'

    I can't replicate the error.
    I have attended to all the suggestions here:
    headers faq

    Any ideas? Why some folks get it and others don't?
    Is it browser caused??

    help..
    thanks

    ~bobbi

  2. dragonsjaw
    Member
    Posted 4 years ago #

    I believe this may be an IE8 Issue.
    The theme header file looks like this:

    <?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
    header("X-UA-Compatible: IE=7");} ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php
    	global $patagonia_nosidebar;
    	$options = get_option('patagonia_options');
    	if (is_home()) {
    		$home_menu = 'current_page_item';
    	} else {
    		$home_menu = 'page_item';
    	}
    	if($options['feed'] && $options['feed_url']) {
    		if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') {
    			$feed = $options['feed_url'];
    		} else {
    			$feed = 'http://' . $options['feed_url'];
    		}
    	} else {
    		$feed = get_bloginfo('rss2_url');
    	}
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <?php if( is_front_page() ) : ?>
    		<title><?php bloginfo('name'); ?> | <?php bloginfo('description');?></title>
    		<?php elseif( is_404() ) : ?>
    		<title>Page Not Found | <?php bloginfo('name'); ?></title>
        <?php elseif( is_search() ) : ?>
        <title><?php  print 'Search Results for ' . wp_specialchars($s); ?> | <?php bloginfo('name'); ?></title>
    		<?php else : ?>
    		<title><?php wp_title($sep = ''); ?> | <?php bloginfo('name');?></title>
    		<?php endif; ?>
    <meta http-equiv="imagetoolbar" content="no" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/clear.js"></script>
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    </head>

    Could the first line in the header code be throwing this warning ??:

    'Warning: Cannot modify header information - headers already sent by (output started at /home/siteword/public_html/wp-content/themes/patagonia/main.php:8) in /home/siteword/public_html/wp-content/themes/patagonia/header.php on line 2'

    Any help?

    This is not happening on Macs, on Vista 64 w/ IE7 and FF3.
    or XP IE7 and FF3.

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic