• ResolvedModerator t-p

    (@t-p)


    hi,

    I searched the forum but could not find guidance to solve my problem.

    I slighly modified wp-comments-post.php and comments.php to add a simple non-captcha question to my comments page. It worked fine in 2.8.6 but not in 2.9. I get the following Four errors.

    Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/siteXXXX../wp-comments-post.php:2) in /home/virtual/siteXXXX../wp-comments-post.php on line 99

    Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/siteXXXX…/wp-comments-post.php:2) in /home/virtual/siteXXXX…/wp-comments-post.php on line 100

    Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/siteXXXX…/wp-comments-post.php:2) in /home/virtual/siteXXXX…wp-comments-post.php on line 101

    Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/siteXXXX…/wp-comments-post.php:2) in /home/virtual/siteXXXX…/wp-includes/pluggable.php on line 868

    These are three lines 99, 100,and 101 in comments.php (part of the code I added), respectively:

    (line 99) name=”captcha” value=”<?php echo $captcha_answer; ?>”
    (line 100) /><?php echo $captcha_answer; ?></label>
    (line 101) <?php } ?></p>

    here is line 868 from pluggable.php:

    header(“Location: $location”, true, $status);

    Please someone guide to fix this issue. thanks. tara

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Hi,

    I still need help. Anybody?

    Additional info: If I use wp-comments-post.php and comments.php files from 2.8.6 in 2.9, there is no problem.

    However, since these files were changed in 2.9, I transferred my modification to the new changed files in 2.9

    I noticed line 868 from pluggable.php reads in 2.9:

    header(“Location: $location”, true, $status);

    Any gidance will be greatly appreciated. Thanks.

    Something at line 2 of wp-comments-post.php has been sent to the browser ahead of the headers.

    More than likely you have a blank line, or a wayward space in wp-comments-post.php at line 2.

    Moderator t-p

    (@t-p)

    Got it!

    Thanks vtxyzzy for your help.

    Happy New Year!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: Cannot modify header information…’ is closed to new replies.