• simcomedia

    (@simcomedia)


    If i’m logged in there’s no error displayed. However, if i’m logged out and arrive at the home page of the site I get this:

    Warning: Cannot modify header information – headers already sent by (output started at /home2/xxxxxx/public_html/wp-content/themes/Seashore/seashore/header.php:4) in /home2/xxxxxx/public_html/wp-content/plugins/members-only/members-only.php on line 97

    I have the plugin set to divert to an ‘about us’ page with some simple text about the site being member’s only and to contact us for info. So, to test it, I logged out and tried to connect with the home page. The error causes the script to fail and therefore the home page displays anyway.

    Any ideas on the cause/fix?

Viewing 2 replies - 1 through 2 (of 2 total)
  • hami

    (@hami)

    This should be fixed in the lastest version (0.5) once and for all. I’ve changed where the plugin is called from wp_head to template_redirect.

    / Hami

    Roger Theriault

    (@rogertheriault)

    It seems WP 2.5 cares about your plugin main files, is there something like this around line 97 of members-only.php?

    ?>
    
    <?php

    If so, when that page is processed it is outputting the spaces and linefeeds… and before the header presumably. It looks like WP now wants that file to be code only, no HTML. Try using “echo” with quoted text or a heredoc instead.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Members Only] latest version throwing premature header error’ is closed to new replies.