[resolved] Headers already sent error (4 posts)

  1. BluePanda
    Posted 4 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

    <h3>Latest articles</h3>
    					<?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;?>

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


  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Contributor

    Posted 4 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
    Posted 4 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)
    Plugin Contributor

    Posted 4 years ago #

    Thanks for following up

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.