WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Warning: Headers Already Sent, reference line (9 posts)

  1. jd99
    Member
    Posted 1 year ago #

    I recently attempted to update to 3.5.1 and had a lot of problems with the white screen. Right now, the blog is working on an unchanged twentytwelve theme with only a couple of widgets and akismet running. Since its working, I'd like to try to get ahead of the next failure. With the wp-config debug set to true, I get this response (and a white screen) when I try to preview a post:

    Warning: Cannot modify header information - headers already sent by (output started at /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-includes/functions.php:2839) in /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-includes/pluggable.php on line 876

    I've used search and read the FAQ on troubleshooting, which says I should look at line 2839 of the functions file. But it doesn't have that many lines.

    With debug set to false, the site works fine and I can preview posts, but this is also the only warning I've seen in all my white screen episodes.

    How do I eliminate it?

    Site hosted at Earthlink, php version 5.3.20, the blog is attached to a static html site that works fine. Site is

    http://www.christianfighterpilot.com/blog

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  3. jd99
    Member
    Posted 1 year ago #

    Just finished (re)doing that. No change.

  4. catacaustic
    Member
    Posted 1 year ago #

    if it's a live site, then WP_DEBUG should always be set to false. Leaving it as true shows off some of your server info and can give hackers a helping hand if they are looking for it.

    Even though the FAQ says that you shoud go to that line because that's what the error says, in this case that's not actually where the error is originating. Becuase it's the pluggable.php file, that tells you that there's something wrong with one of your plugins and it's sending content before the headers are sent. Most times this is because there's some leading white-space in front of the opening <?php tag on one file somewhere in one of your plugins. If you want to do some more serious de-bugging and find out where it's happening, there are PHP functions like debug_print_backtrace() that will show you the full execution path of your script, and that can realyl help to narrow things down a lot.

  5. jd99
    Member
    Posted 1 year ago #

    I understand debug is a troubleshooting tool. I only had one plug-in operating, but several old ones deactivated. I deleted them all, and the errors all seem to be gone, for now. I'll celebrate after about 24 hours if it doesn't crash...

    Resolution seemed to be deletion of all uploaded files and folders (except content), and deletion of all plugins.

  6. catacaustic
    Member
    Posted 1 year ago #

    Ah... That was a point that I did forget this time (and Have forgotten in the past). Plugins don't have to be active to throw that error. Because WordPress has to read in the main plugin file, if there's an error in that file it will still throw an error even if the plugin isn't activated.

  7. jd99
    Member
    Posted 1 year ago #

    Back to unresolved.

    After having a "good" site as described above, I wrote a new post. As soon as I hit "save draft," the white screen returned. Now I get it every time I save, preview, try to add a comment, or even logout (all of which I could do before successfully).

    This is the sole error I get when I save a draft or make a comment:

    Warning: Cannot modify header information - headers already sent by (output started at /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-settings.php:3) in /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-includes/pluggable.php on line 876

    However, when I try to logout, I get

    Warning: Cannot modify header information - headers already sent by (output started at /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-includes/functions.php:3) in /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-login.php on line 368

    Warning: Cannot modify header information - headers already sent by (output started at /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-includes/functions.php:3) in /services2/webpages/c/h/christianfighterpilot.com/public/blog/wp-login.php on line 380

    and 14 more just like it (just different lines).

    I've referenced those lines (cookies and author information) and can't figure out why I suddenly have an error.

    Any help?

  8. jd99
    Member
    Posted 1 year ago #

    I just deleted the theme, reinstalled it. Same problem.

    I deleted and re-uploaded the php files within wp-admin -- no change.

    I deleted and re-uploaded the php files within wp-includes -- everything now works...for the time being, as far as I can tell. I still don't know what caused the white screen issue.

    I went through the same test steps: commented, edited, previewed, new draft, everything worked.

    I just don't know why.

  9. jd99
    Member
    Posted 1 year ago #

    This problem continues to repeat; I inadvertently started a second thread on this topic here:

    http://wordpress.org/support/topic/white-screen-returns-on-save-draft-preview-commenting

Topic Closed

This topic has been closed to new replies.

About this Topic