• I keep getting this error message on just one page. I amusing the paid membership pro plug in and everything is working great except I can’t seem to get rid of this one error.

    Warning: Cannot modify header information – headers already sent by (output started at /home/abmtcorg/public_html/wp-content/wp-content/themes/lectura-lite/header.php:2) in/home/abmtcorg/public_html/wp-content/wp-includes/pluggable.php on line 1174

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi
    this is the way you can try to discover the problem and let me hope that it will help
    The header must come first in the response from a web server and is separated from the body by one blank line. The reason this error occurs is that some part of the body of the web page has been sent to the user already when a request is made to set a header value. Because PHP simplifies many things for you, the problem may be hiding in plain site. Here are some guidelines for finding the problem:

    1) Find the header() statement that is causing the problem. The error must be at or before this line.

    2) Look for any statements that could send output to the user before this header statement. If you find one or more, change your code to move the header statement before them. Complex conditional statements may complicate the issue, but they may also help solve the problem. Consider a conditional expression at the top of the PHP script that determines the header value as early as possible and sets it there.

    3) Make sure there is no white space outside of the php start and end tags. While a blank line before the <?php start tag may look innocent, when processed by PHP, it will turn into an echo statement printing out a blank line. This is a common culprit.

    Thread Starter michaelp25

    (@michaelp25)

    Thanks! I have to admit, I am not an experienced enough wordpress user to really understand your solution. When I googled the error message I found a couple of articles that mentioned the blank line in php so it sounds right, I just have no idea where to start fixing it. No php experience at all here. But I guess this is how you learn.

    I appreciate the help and and prompt feedback. Thank you so much.

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