WordPress.org

Ready to get started?Download WordPress

Forums

Facebook
[resolved] Headers already sent error (4 posts)

  1. BluePanda
    Member
    Posted 2 years ago #

    On my website (non-wordpress pages) I have a recent posts feed showing. That part works fine, but I am getting the error

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/bluepand/public_html/index.php:25) in /home/bluepand/public_html/blog/wp-content/plugins/facebook/includes/facebook-php-sdk/facebook.php on line 39

    The code I use to grab the recent posts is

    <?php
    require('blog/wp-blog-header.php');
    ?>
    
    <h3>Latest articles</h3>
    				<div>
    					<?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></p>
    <?php endwhile;?>
    				</div>

    Any ideas on how to solve this? You can view the problem at http://blue-panda.co.uk (right bar of index page)

    http://wordpress.org/extend/plugins/facebook/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Contributor

    Posted 2 years ago #

    Look at the end of your /home/bluepand/public_html/index.php file. You may have a blank line or something after the closing ?> line.

    Just remove the ending ?> and that will likely fix it.

  3. BluePanda
    Member
    Posted 2 years ago #

    Fixed it. Just moved the require to the top of index, I guess a session was being set by it from the facebook plugin

  4. Matt Kelly (Facebook)
    Member
    Plugin Contributor

    Posted 2 years ago #

    Thanks for following up

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.