WordPress.org

Forums

Redirection
ERROR: Warning: Cannot modify header information (17 posts)

  1. cjohnweb
    Member
    Posted 2 years ago #

    I've figured after some time of trial and error that this plugin is causing errors with the newest verison of wordpress.

    Here are some of the errors I get -

    I get this at /wp-admin when I am not logged in

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-includes/pluggable.php on line 881

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-includes/pluggable.php on line 881

    In other plugins, like a google analytics plugin I use, I get errors like this:

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-content/plugins/redirection/ajax.php on line 23

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-content/plugins/redirection/ajax.php on line 24

    The error noted - plugins/redirection/ajax.php on line 24. I have not looked to see what this error is caused from, but none the less I thought I would share this in hopes that everyone else who is also having this error can get past it. The problem is that this error does not cause wordpress to disable the plugin, but the error does prevent you from logging into /wp-admin. If you are logged in already, you are fine for the most part, but if you are not logged in and access /wp-admin, you get an error and no login form.

    So I'm thinking, how do people having this error find how to fix the issue? Can wordpress force an update somehow so the error just "goes away" without users having to first disable the plugin, login to wp-admin, update the plugin and reactivate it...? Otherwise many people will not know how to fix the problem.

    Thanks

    http://wordpress.org/extend/plugins/redirection/

  2. pacovilla
    Member
    Posted 2 years ago #

    The problem is going to be in the general-template.php file. See: Locate the extra line(s) or space(s) and the problem will stop.

  3. DatingAdviceTipsAndSecrets
    Member
    Posted 2 years ago #

    Doesn't seem to be plugin related. We're getting the same error after updating to 3.4 and don't use that plugin.

    As to the general-template.php file line 2099 being the culprit here's the code directly from wordpress for line 2099:

    echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );

    (the offending line). The var $file contains wp-admin but there are no extra spaces in any incarnation we looked at.

    We logged in using wp-login.php instead of wp-admin but we also get errors on dashboard again because of line 2099 in general-template which is the function wp_admin_css. Errors:

    wp-includes/general-template.php:2099) in /home/xxx/public_html/wp-includes/option.php on line 563

    wp-includes/general-template.php:2099) in /home/xxx/public_html/wp-includes/option.php on line 564

    both of those lines in option.php call setcookie

    short of commenting out the echo on 2099 (which works) it's making us crazy. Anyone got a fix?

  4. fotodc
    Member
    Posted 2 years ago #

    I have the same problem

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-includes/class-wp-ajax-response.php on line 129

    Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/general-template.php:2099) in /wp-includes/pluggable.php on line 881

  5. fotodc
    Member
    Posted 2 years ago #

    In my site, I turned off one of the plugins. Now is OK.

  6. WP Marmite
    Member
    Posted 2 years ago #

    Hi,

    I've got the same problem. I just turned off the popup domination and everything was working again :)

  7. Jajton
    Member
    Posted 2 years ago #

    having the same issue when i update functions.php....

    would be nice if anyone could help me :)

  8. Jajton
    Member
    Posted 2 years ago #

    I cant visit admin site...

    Pls help

  9. EWSEL Team
    Member
    Posted 2 years ago #

    edit ur functions.php from ftp software and see on start and end if ther is any space remove it

  10. Dreadpoule
    Member
    Posted 2 years ago #

    Oh god thanks for the space council, that's work !!!

  11. maianpc
    Member
    Posted 2 years ago #

    hi i need help now. please!!!!!

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-login.php on line 362

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-login.php on line 374

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-includes/pluggable.php on line 680

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-includes/pluggable.php on line 681

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-includes/pluggable.php on line 682

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/67/9943067/html/wp-content/plugins/drgen-social/drgen-social.php:1) in /home/content/67/9943067/html/wp-includes/pluggable.php on line 881

    Thanks

  12. phil-wp
    Member
    Posted 2 years ago #

    My two pence worth.

    ...
    SMTP -> get_lines(): $str is "535 5.7.8 Error: authentication failed: Authentication failed "
    SMTP -> get_lines(): $data is "535 5.7.8 Error: authentication failed: Authentication failed "
    SMTP -> ERROR: Password not accepted from server: 535 5.7.8 Error: authentication failed: Authentication failed
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250 2.0.0 Ok "
    SMTP -> get_lines(): $data is "250 2.0.0 Ok "
    SMTP -> FROM SERVER:250 2.0.0 Ok

    Warning: Cannot modify header information - headers already sent by (output started at $HOME/public_html/wp-includes/class-smtp.php:803) in $HOME/public_html/wp-includes/pluggable.php on line 881

    First - WP 3.4.2 $HOME/config.php has no final ?>

    Second - using plugin SMTP, debug mode checked, left on accidentaly, throws out debug text whenever a comment is posted while attempting email notification of comment to author.

    Third - The admin account password for SMTP email authentication had changed but not reconfigured in the Plugin.

    Solution: Banged head against wall, unchecked debug mode in SMTP, entered correct admin password.

    The only puzzle left is how on earth the config file was working with the final ?> tag missing.

  13. rvnder
    Member
    Posted 2 years ago #

    Not worked for me ..after removing the spaces.Also there is no ?> in wp-config file .

    Warning: Cannot modify header information - headers already sent by (output started at /home/affiliat/public_html/wp-config.php:1) in /home/affiliat/public_html/wp-includes/pluggable.php on line 881

  14. paul_saccone
    Member
    Posted 2 years ago #

    I just ran into the same problem this morning.

    In an effort to be tidy and document my custom code, I added a line containing comments just before some custom PHP in my child-theme's functions.php file. Once I put the comments inside of the PHP tags, the error went away.

    Hope that helps everyone else too!

  15. compmech
    Member
    Posted 2 years ago #

    Removing the white space at the end of my functions.php file resolved this issue for me.

    I add inadvertently left the white space after inserting and later removing a function.

  16. Cenemil Jones
    Member
    Posted 2 years ago #

    Yeah, most of the reasons this error always manifest is the excessive white spaces. The link below is very helpful. I just solved my problem with my theme-editor of which I mistakenly put excess white space after "<?php" of the functions.php. Hope this will help you too! Good luck!

    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

  17. k7sourabh
    Member
    Posted 2 years ago #

    i have found this nice article visit click here

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Redirection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags