Forums

Cannot modify header information - headers already sent by (output started at (33 posts)

  1. rcpkrc
    Member
    Posted 2 years ago #

    Hello friends, l am having this error, anyone know the reason ? thanks..

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/blog/wp-content/plugins/widgets2/widgets.php:2290) in /home/xxxxxx/public_html/blog/wp-includes/pluggable.php on line 275
  2. rcpkrc
    Member
    Posted 2 years ago #

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/blog/wp-content/plugins/widgets2/widgets.php:2290) in /home/rcpkrc/public_html/blog/wp-comments-post.php on line 55

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/blog/wp-content/plugins/widgets2/widgets.php:2290) in /home/rcpkrc/public_html/blog/wp-comments-post.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/blog/wp-content/plugins/widgets2/widgets.php:2290) in /home/rcpkrc/public_html/blog/wp-comments-post.php on line 57

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/blog/wp-content/plugins/widgets2/widgets.php:2290) in /home/rcpkrc/public_html/blog/wp-includes/pluggable.php on line 275

  3. Otto42
    Moderator
    Posted 2 years ago #

    My guess would be that you have a blank line at the end of your widgets.php file, after the final ?> bit. Remove it.

  4. rcpkrc
    Member
    Posted 2 years ago #

    no it doesnt work! the same error!

  5. Otto42
    Moderator
    Posted 2 years ago #

    output started at /home/...plugins/widgets2/widgets.php:2290

    Well, I don't know what it is that you're doing, but the widgets.php file is not 2290 lines long. I'd say that you've seriously corrupted it somehow. Replace the file with an original copy from the widgets zip file.

  6. blogbasis
    Member
    Posted 2 years ago #

    I am having this same problem with a new install. I have tried everything listed here and nothing seems to work.

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/a/r/carlkiwi/html/wp-config.php:1) in /home/content/c/a/r/carlkiwi/html/wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/a/r/carlkiwi/html/wp-config.php:1) in /home/content/c/a/r/carlkiwi/html/wp-includes/pluggable.php on line 313

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/a/r/carlkiwi/html/wp-config.php:1) in /home/content/c/a/r/carlkiwi/html/wp-includes/pluggable.php on line 314

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/a/r/carlkiwi/html/wp-config.php:1) in /home/content/c/a/r/carlkiwi/html/wp-includes/pluggable.php on line 275

  7. Otto42
    Moderator
    Posted 2 years ago #

    headers already sent by (output started at ...wp-config.php:1

    Your wp-config.php file has a blank line at the very beginning of it.

    All the major wordpress files must start with <?php and must end with ?>. No blank lines around them are allowed!

  8. ChrisKing
    Member
    Posted 2 years ago #

    I am also having a similar problem...

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d195165291/htdocs/wp_blog/wp-config.php:1) in /homepages/0/d195165291/htdocs/wp_blog/wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d195165291/htdocs/wp_blog/wp-config.php:1) in /homepages/0/d195165291/htdocs/wp_blog/wp-includes/pluggable.php on line 313

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d195165291/htdocs/wp_blog/wp-config.php:1) in /homepages/0/d195165291/htdocs/wp_blog/wp-includes/pluggable.php on line 314

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d195165291/htdocs/wp_blog/wp-config.php:1) in /homepages/0/d195165291/htdocs/wp_blog/wp-includes/pluggable.php on line 275

    any ideas?

  9. TheTodd
    Member
    Posted 2 years ago #

    I've observed a similar problem trying to upload a file via the 'write post' page. I have checked my config.php file for extra lines and spaces next to <? and ?> as well as in the php files referred to . With no surrounding spaces or lines it still happens. Suggestions?

    The error...

    The uploaded file could not be moved to /home/ftpuser/toddspace/wordpress213/wp-content.
    Warning: Cannot modify header information - headers already sent by (output started at /home/ftpuser/toddspace/wordpress213/wp-admin/admin-functions.php:1887) in /home/ftpuser/toddspace/wordpress213/wp-includes/functions.php on line 1221

  10. TheTodd
    Member
    Posted 2 years ago #

    I did read the troubleshooting FAQ's answer to this problem, but there's no <? or ?> on the problem line 1887 (now 1886). There are spaces, but I don't know anything about php and don't want to break the code.

  11. Otto42
    Moderator
    Posted 2 years ago #

    TheTodd: The error you are getting is because of this:
    The uploaded file could not be moved to /home/ftpuser/toddspace/wordpress213/wp-content.

    The permissions on your wp-content directory or on your uploads directory won't allow it to move files to there. Set the permissions on the uploads directory to 666. If there is no uploads directory, create one under wp-content.

  12. jorasho
    Member
    Posted 2 years ago #

    I'm having the same problem. My uploads folder is even set to 777, so there shouldn't be a problem. It occurred at the same moment, and in WP 2.1.2 there was no problem.

  13. swooperz
    Member
    Posted 2 years ago #

    I got this working for me. My problem was that my wp-settings.php file had an extra space (carriage return actually) after the closing php tag.

    Upon removal of the space after the ?> tag, everything worked perfectly. So, my advice is look at ANY php files you may have initially edited to configure your site for your needs, and check them for spaces before or after the php tags.

    Hope that helps,
    Alan

  14. bangaiptop
    Member
    Posted 2 years ago #

    I had same problem (with WP 2.1.3)
    1. make folder uploads in /wp-content
    2. CHMOD to 666
    3. remove space after ?>tag

    But when i tried to upoad my files to /uploads, it said:
    1. still same error (errno=13 - Permission denied) ... wp-includes/functions.php on line 972

    2. still same error 'Warning: Cannot modify header information - headers already sent by (output started at /folders/wp-includes/functions.php:972)'

    3. error in folders/wp-includes/functions.php on line 1221

    Then i try to figure it out. Line 1221 in function.php is 'header('Content-Type: text/html; charset=utf-8');'
    Unfortunately, there is no significant result till now. Then, I try downgrade it to WP 2.1.2 (like Jorasho said). The problem is gone.

    Well, i hope there is another solution than downgrade for this problem :)

  15. dyknight
    Member
    Posted 2 years ago #

    I had this issue, but it has been resolved.

    First, I disabled all plugins and activated them one by one. After activating each one, I refreshed the pages that gave me the error(s). It wasn't long before I narrowed down on the problematic one and disabled it. The incompatible plugin happened to be Hello Dolly.

  16. adamrice
    Member
    Posted 2 years ago #

    I'm getting the same thing with a (slightly hacked up) version of a widget called "dropdown archives": it's complaining about pluggable.php, line 331. This is with WP 2.2.1.

    What's curious is that the widget, best as I can tell, is not writing anything to headers. But disabling it does seem to resolve the problem.

  17. anthb
    Member
    Posted 2 years ago #

    Just had the same error (on wp 2.2.1):

    Warning: Cannot modify header information - headers already sent by (output started at /home/ininon/public_html/my-beauty-info/wp-content/plugins/beta12b-linking-plugin-v4.php:1) in /home/userb2/public_html/my-beauty-info/wp-login.php on line 12 (mbic)

    Removing the empty line behind the ?>tag did not fix it.

    Here's what I did:

    1. Take the plugin that was causing an issue and open it in notepad
    2. Copy the entire contents (CTRL-A)
    3. Create a new .txt file and paste the entire contents (CTRL-V)
    4. Save and compare the file size with right-click file > properties

    Results: one file (the old one) was 72,800 bytes, while the new one was 72,796 - 4 bytes less.

    Maybe the programming software that the coder was using wrote a special char to the end of the file that conflicted with Wordpress.

    It may also be that the wordpress charset settings conflict with the coder's programming software or something like that.

    This fixed the issue, and I think you could fix most plugins like this!

  18. anthb
    Member
    Posted 2 years ago #

    Resolving this "cannot modify header" issue also has another effect on wp2.2.1: it makes the post-new.php (write>write post) work correctly.

    Normally you would notice the "cannot modify header" error messages during login or logout (or just after activating a plugin maybe?), but another way to know that this is happening is when you would just get a blank page after writing a post and hitting publish.

    When you then fix the error the post-new.php works correctly and you just get the writing interface back instead of a blank page.

  19. rcpkrc
    Member
    Posted 2 years ago #

    l solved the problem on www.bigphp.net but l m having another problem on www.freewebsitedirectory.org
    l want to make costum paths for templates.
    There is costum temp paths comes with wp like
    <?php include (TEMPLATEPATH . '/anypage.inc'); ?>
    but l want to change it like
    <?php include (ANYPATH . '/anypage.inc'); ?>
    l want to ask if its possible?
    thaks.

  20. craigl
    Member
    Posted 2 years ago #

    [moved to new post in widget forum]

  21. alzabo
    Member
    Posted 2 years ago #

    Having the same problem, checked the listed above relevant wordpress page, tried the removing space at end fix, no go....

    Here's what I get -

    The uploaded file could not be moved to /wordpress/wp-content/uploads/2007/09. Warning: Cannot modify header information - headers already sent by (output started at /wordpress/wp-admin/admin-functions.php:1986) in /wordpress/wp-includes/functions.php on line 1346

    any help would be great, I've got the site all ready to go except for this, and would hate like hell to have to bail now...I'm sure there must be an answer....

  22. alzabo
    Member
    Posted 2 years ago #

    Great, this is really helping out....

  23. alzabo
    Member
    Posted 2 years ago #

    Yeh, tried all this, EXTENSIVELY...nothing changes in the least.

    Sadly, it appears I'll have to go to another system, this is a dealbreaker in terms of my site for me.

    Any ideas on a system similar to wordpress?

    not that anyone's reading this anyways....

  24. alzabo
    Member
    Posted 2 years ago #

    Ok, I fixed it, and would like to help anyone else out there who I can help...

    What fixed it was setting the chmod to 777 for the ENTIRE wp-content folder not just the uploads.

    Thanx for all the help!! It was awesome the way the community came out of the woodwork to help out!!

  25. paperfrog
    Member
    Posted 2 years ago #

    Ran into his problem after editing wp-config.php. Sure enough: an extra carriage return. Thanks, guys.

  26. SylvainS
    Member
    Posted 2 years ago #

    Sure, this extra blank space / carriage return is the cause of the error, most of the time.

    BUT...

    You also get the error for another reason : as soon as a plugin references a UTF-8 file (with the php "include", for instance). The problem is solved as soon as you convert the faulty file (or all files, in case of doubt) to ANSI/ASCII.

    That explains the 4-byte question of anthb, earlier in this thread : if you open a UTF-8 file with UltraEditStudio (or any serious editor) and display the content in hexadecimal (CTRL+H in UEStudio), you'll see that the UTF-8 version has an additionnal "FF FE" at the beginning of the file. This is what breaks the header chain.

    Unfortunately, converting from UTF-8 to ANSI was a very bad news for me, as I had to "utf8_encode" every piece of text having special chars in them.

    I hope this will help, I haven't seen this info anywhere else on the Net and have spent an outrageous amount of time to track down this stupid error !

  27. davinder452
    Member
    Posted 1 year ago #

    <? ob_start(); // line 1
    session_start(); // line 2

    $bla . $bla $bla . $bla and so on..........

    ?>

    Put these two things when your php coding starts (i.e. on like 1 and 2)

    Hope it'll solve the problem.

    Davinder singh
    Artistic website creations

  28. RodolfoPalominos
    Member
    Posted 1 year ago #

    Tengo el problema del error Warning: Cannot modify header information - headers already sent by (output started at bla bla bla desde un par de días atrás.

    Todo funcionaba muy bien, y de pronto... paf! He reinstalado cuantas versiones de WP tenía guardadas y ninguna funciona.

    ¿Qué carajo? ¿Me cambio a otro sistema? No quiero, porque me gusta mucho Wordpress :(

  29. zkizzik
    Member
    Posted 1 year ago #

    Hey, no te arrugues XD

    <?php
    error_reporting(0);
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    Con error_reporting(0); evitas que aparezcan los múltiples errores de programación de wordpress, personalmente he modificado manualmente mi blog caso por completo reparando muchas fallas exepto una que no he podido reparar en el blog de un amigo.

    Para evitar errores como una llamada header(); escribelo de la siguiente forma @header(); y así evitas problemas mientras se soluciona ya que no arrojará ningún error más pero eso no significa que no deje de funcionar mal XD. Si te fijas cuando hay un error de conección a la base de datos se hace un desmadre con errores XD asi por lo menos los evitas ya que en vista que el programador no tiene la costumbre de verificar estados y funciones antes de declararlas o ejecutarlas, cosas que con un simple if(... se solucionan.

  30. josephtbradley
    Member
    Posted 1 year ago #

    This happened to me as well. I have no posts, and the tag cloud was killing it. I disabled that widget, and it works now.

Topic Closed

This topic has been closed to new replies.

About this Topic