[Plugin: SI CAPTCHA Anti-Spam] Warning: session_start() [function.session-start]: Cannot send sessio (2 posts)

  1. kwporg
    Posted 6 years ago #

    WP 2.8.4
    Theme is Ocadia 1.3

    Works fine when actually in the blog.

    I display a couple posts on my home page using the following code:

        // Include WordPress
        define('WP_USE_THEMES', false);
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <link rel="icon" type="image/p'

    at the top of my index.php file and where I want the posts

    <div id="content">
        <!-- mini loop for the excerpts -->
                                <?php while (have_posts()): the_post(); ?>
                                   <h2><?php the_title(); ?></h2>
                                      <?php the_excerpt(); ?>
                                   <p><a href="<?php the_permalink(); ?>" class="text1">Read more...</a></p>
                                <?php endwhile; ?>
                                <!-- end the mini loop -->

    I'm sure this code is what's breaking compatibility, is there a fix?

    Warning message:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at <SNIP>/html/index.php:1) in <SNIP>/amiga/amigablog/wp-content/plugins/si-captcha-for-wordpress/si-captcha.php on line 859

    Appreciate any help.



  2. Mike Challis
    Posted 6 years ago #

    Try this:

    This code must be at the top of your PHP script:

     # session_start is required for the captcha-image to function,
     # and must be at the very top of the PHP script."
     # session_start() must be processed before any other output
     # or you might get a warning "headers already sent".
      if( !isset( $_SESSION ) ) {

Topic Closed

This topic has been closed to new replies.

About this Topic