WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot modify header information - Error (27 posts)

  1. allanlud
    Member
    Posted 6 months ago #

    Hi,

    I have seen this problem on a lot of posts and the main reason seems to be white space. The posts I have seen usually include some plugin file or header/index.php file.

    So this is the full story - I have moved a site to a new server, hosting company. The blog seemed to be working fine after the move, I updated to the latest version of WordPress, 3.8.1 I believe and updated plugins and themes (there are only 3 plugins in total on the site).

    The problem occurs for me when I update/publish a post.

    This is the full error I am getting (after I have changed 'WP_DEBUG' to 'true'):

    Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( 'automatic-feed-links' ) instead. in /usr/local/pem/vhosts/236304/webspace/httpdocs/xxx.ie/blog/wp-includes/functions.php on line 2908

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/236304/webspace/httpdocs/xxx.ie/blog/wp-includes/functions.php:2908) in /usr/local/pem/vhosts/236304/webspace/httpdocs/xxx.ie/blog/wp-admin/post.php on line 233

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/236304/webspace/httpdocs/xxx.ie/blog/wp-includes/functions.php:2908) in /usr/local/pem/vhosts/236304/webspace/httpdocs/xxx.ie/blog/wp-includes/pluggable.php on line 896

    I am not sure what to do now, I have looked in those files and don't see anything out of the ordinary. I was thinking of replacing the wp-admin and wp-includes folders with the latest version of WordPress manually to see if that helps.

    Any suggestions?

  2. dimitris33
    Member
    Posted 6 months ago #

    what message do you get with wpdebug = off?

  3. esmi
    Forum Moderator
    Posted 6 months ago #

    Looks like you are using an outdated theme. What happens if you use the default 2014 theme?

  4. allanlud
    Member
    Posted 6 months ago #

    @dimitris33 There are no messages when WP DEBUG is false

    @esmi I haven't tried that yet (thought I had tried everything before I posted here), will let you know how I get on with that.

  5. dimitris33
    Member
    Posted 6 months ago #

    @alla

    then what is the problem?

  6. esmi
    Forum Moderator
    Posted 6 months ago #

    @dimitris33: Uh? What did you expect? If wp_debug is turned off, there'll be no errors in the log file.

  7. dimitris33
    Member
    Posted 6 months ago #

    sorry, i am trying to understand if @allan has a problem with this theme/install.

    If it works with wp_debug=off then i think he's alright.

    also i agree that the message you get is code related, the theme author has to update the theme's code.

  8. esmi
    Forum Moderator
    Posted 6 months ago #

    If it works with wp_debug=off then i think he's alright.

    No. It just means that errors aren't being logged by WordPress. They'll still be showing up in the server's error logs

  9. dimitris33
    Member
    Posted 6 months ago #

    The problem occurs for me when I update/publish a post.

    confused, is there something on the site that is preventing you (allan) to work? or are you worried about your logs?

    if its the latter then its common (my opinion) to see notices, try a plugin named 'theme check' and see whats happening with most of the themes.

  10. allanlud
    Member
    Posted 6 months ago #

    Sorry, I don't think I mentioned exactly what is happening, after I hit Publish/Update a post the screen is blank (but the post still gets edited), and with WP DEBUG set as true it displays what errors are there.

    @esmi - I have just tried the twentyfourteen theme and as I set the theme the page went blank but the theme still activated and when edited a post it seemed to work ok - so looks like it is a theme issue. I didn't install the theme and there have been many edits to the theme files so what do you think is the best approach to this?

  11. esmi
    Forum Moderator
    Posted 6 months ago #

    Where did you download this theme from?

  12. allanlud
    Member
    Posted 6 months ago #

    Hi esmi, I didn't download the theme, someone else downloaded and installed the theme.

    The thumbnail of the theme has The WRC Theme Viewer on it, if that rings a bell.

    On a side note it looks like the WordPress installation is causing a lot of errors on the server according to the error logs - possibly because of the theme.

  13. esmi
    Forum Moderator
    Posted 6 months ago #

    What is the name of the theme?

  14. allanlud
    Member
    Posted 6 months ago #

    It looks like it was renamed to a short version of the website domain.

    The thumbnail looks a lot like the twentytwelve theme, but with no main navigation and the main image full width.

  15. dimitris33
    Member
    Posted 6 months ago #

    @allan

    This may be an issue with your browser also, do you get the blank screen with 2014 using another browser?

    You can also post your url to see the theme maybe we'll find more info this way.

  16. esmi
    Forum Moderator
    Posted 6 months ago #

    Site url?

  17. allanlud
    Member
    Posted 6 months ago #

    Hi dimitris33, thanks for replying. The twentyfourteen theme displayed fine, it was only after I had activated it that the screen went blank (in the dashboard).

    I use Firefox and I just tried to log into the dashboard in Chrome and the login page is blank - but it is fine in Firefox (must be cached as it doesn't work in IE either).

  18. allanlud
    Member
    Posted 6 months ago #

    Here is the site - http://www.bmsaccountants.ie, the blog is install on this page - http://www.bmsaccountants.ie/bms-blog/

  19. dimitris33
    Member
    Posted 6 months ago #

    ok, if the problem is the code you can

    1.remove it
    2.fix it

    http://codex.wordpress.org/Automatic_Feed_Links

    open your functions.php

    find this "automatic_feed_links"

    delete it and add

    add_theme_support( 'automatic-feed-links' );

    let me know how it goes.

    ps.your theme looks custom.

  20. allanlud
    Member
    Posted 6 months ago #

    Thanks for the reply, that has fixed the deprecated error message, but still after clicking update on a post I get a white screen with the following error: (WP_DEBUG is set to true)

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/236304/webspace/httpdocs/bmsaccountants.ie/bms-blog/wp-content/themes/bms/functions.php:427) in /usr/local/pem/vhosts/236304/webspace/httpdocs/bmsaccountants.ie/bms-blog/wp-admin/post.php on line 233 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/236304/webspace/httpdocs/bmsaccountants.ie/bms-blog/wp-content/themes/bms/functions.php:427) in /usr/local/pem/vhosts/236304/webspace/httpdocs/bmsaccountants.ie/bms-blog/wp-includes/pluggable.php on line 896

    I am chatting with my hosting company too, there seems to be a slight issue with our error logs, as in they are huge in file size. I've checked and one re-occurring error is:

    [Thu Feb 06 14:12:58 2014] [error] [client 78.153.216.42] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/share/pear/:/usr/share/php/:/usr/local/pem/vhosts/236304/) in /usr/local/pem/vhosts/236304/webspace/httpdocs/bmsaccountants.ie/bms-blog/wp-includes/functions.php on line 1366

    So I am hoping they can help me with that.

  21. allanlud
    Member
    Posted 6 months ago #

    Seem to be having a problem with this line in the wp-includes/functions.php file line 1366:

    // We need to find the permissions of the parent folder that exists and inherit that.
    	$target_parent = dirname( $target );
    	while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
    		$target_parent = dirname( $target_parent );
    	}
  22. dimitris33
    Member
    Posted 6 months ago #

    never touch wp core files.

    I think the problem is somewhere to tell you the truth.i am guessing that your theme's code must be updated to work with 3.8.1.

    just to be sure, you can check for spaces or open php tags in your functions.php but i doubt that the problem is there.

  23. allanlud
    Member
    Posted 6 months ago #

    It looks like the code in the last reply is causing a lot of errors in the error logs (repeatedly the same error with the same time) and this is causing a large file size, so for now I am going to remove the files from the server until tomorrow, hopefully I will have more of an idea how to stop this by then.

  24. dimitris33
    Member
    Posted 6 months ago #

    allan,

    i saw again the path to the error and it is in wp-incudes/functions.php

    this is a core file, i thought it was your theme's functions.php and the changes i ask you to make was for that file, not the core file.!
    sorry about that.

    i'll check again tomorrow if you made any progress and see if i can help you.

  25. esmi
    Forum Moderator
    Posted 6 months ago #

    This is not a core WordPress issue. Can you replicate the problem using the default Twenty Fourteen theme with all plugins deactivated?

  26. allanlud
    Member
    Posted 6 months ago #

    Hi dimitris and esmi.

    I haven't changed any code in the wp-includes/functions.php file as I know that is a core file.

    I was chatting again with the hosting company and they had to get an engineer to look at the problem. The error logs on the server reach about 80GB earlier, when they reset the error logs (at about 6pm) they went to about 90GB in about 2 hours. The error was just repeating itself constantly even after I had removed the files from the server.

    I think it was still happening with the twentyfourteen theme installed.

    I will try a fresh install tomorrow and see how that goes, this is the first time I have seen something like this. I have installed about 20-30 WordPress sites but never seen this.

  27. allanlud
    Member
    Posted 6 months ago #

    Hi esmi.

    I had found another error in the error_logs this morning that was repeating itself quite a bit and after looking into it more, I stumbled upon an .htaccess file in the root of our webspace which was part of a Magento install before that someone had done.

    Renaming the .htaccess file stopped the error this morning, so that was good.

    Here is the error:
    Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    I'm just after installing a fresh copy of WordPress and everything is working smoothly, I've checked the error_logs and they are all good.

    Maybe the theme being used in the old installation and the .htaccess file from that Magento install had something to do with the error_logs being spammed.

    Looks like this topic is resolved :)

Reply

You must log in to post.

About this Topic

Tags