• Dear All,

    I am writing to you to seek assistance as I have been unsuccessfully trying to resolve the following problem:

    When I try to log-in, this message appears:

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/33/d590534729/htdocs/clickandbuilds/TheWestIndiesYachtClub/wp-content/themes/attitude/functions.php:1) in /homepages/33/d590534729/htdocs/clickandbuilds/TheWestIndiesYachtClub/wp-includes/pluggable.php on line 1207

    This also prevent me to access the log-in panel as this is the only text showing on the page which used to be the one I used to login.

    I must confess that I am quite new to wordpress.

    Subsequently, I went to the said line (1207), to try to remove a space or a blank left which is usually the reason behind such inconvenience.

    The line 1207 is as follows: (in pluggable.php)

    die( ‘-1’ );

    I cannot figure myself how to sort it.

    I would be most grateful if someone could enlighten me regarding what I shall do to sort it….

    Thanks

    Terry.

Viewing 11 replies - 1 through 11 (of 11 total)
  • if this error just started recently.i will advise you to cantact your host and tell them to Restore the backup copy of your site before the date of the error.

    you can also goto cpanel – file manager – wp content – plugins
    edit the pluging name.i will suggest just adding ss, so change plugins to pluginsss. by doing this you will be able to access the login and wp dashboard.when you successfully login, go back to cpanel and change the pluginsss back to plugins.

    hope this helps

    If you made changes which caused the problem, you should tell us about them when you report the problem.

    The error message is saying that some part of the software has output ed something before the software had properly set up the HTML response headers.

    An example of this – I was looking into changing some of WP’s error handling and I modified some code but was not seeing the results I expected. I put an echo statement in the code, just to tell me it was being executed. I ran the software and got the same type of message as you got.

    WP had not yet begun to create the correct package to send to the browser when my echo was executed.

    I removed the echo and the error was gone.I found another way to determine if the code was being executed.

    It just happens that the code I was working on was associated with the die function you show in your question.

    Did you add some code to output something before that statement is executed?

    Before resorting to a site restore, try to fix it surgically, if that fails, use the sledgehammer approach suggested before. Restoring to a backup at the first signs of a problem is not the way to proceed.

    It can cause problems, perhaps worse than the one you are trying to resolve.

    For instance, when was the backup created? Did you make changes after the backup was created that you will need to redo?

    And, in the first place, is there a site backup? You hosting company may not make regular backups.

    So, work the problem a bit before you,as suggested, throw up your hands and decided to restore from a backup..

    What did you change before this stated happening?

    I posted on your other question.

    What is the status of this error – the header error?

    Thread Starter wiyc

    (@wiyc)

    Dear BobNwp,

    Thanks for your answer.

    Indeed, I changed a bit of the code to make the site looking like what I wanted..
    1) I modified the copyright phrasing at the bottom, removing the mention of the theme and wordpress;
    2) I suppressed the large space on the top of the header to make it the smallest as possible.

    Then, when I logged off, the website was looking perfectly as I wanted, but I was not able to log in again !!!

    Would it be helpful if I copy you the code the so could have a look and tell me what in your opinion shall I change.

    Thanks a lot

    Terry

    Did you make backup of the files you changed?

    I suspect you did not do so. But, if you did, and they are copies you made immediately before you made the changes, put them back into production, that is, save the ones now on the server – rename them and add a times-stamp — say the file name is functions.php and you are going to replace it right now – rename it to functions 2015-12-31 1414.php — then upload the copies you made before the changes.

    The times-stamp format is year-month-day time (24 hour format) use leading zeros for months and days so they will show in order in the directory listing.

    Okay, let’s see what we can do — in what files did you make the changes?

    @rexusmo

    You already posted your question. Please do not post in another thread that isn’t about your problem.

    okay @kmessinger

    i just wanted him to check it.maybe he can help answer it.

    Thanks

    Thread Starter wiyc

    (@wiyc)

    Sadly not, I usually always do a backup but I forgot this time.

    I modified a CSS to have the header shortened (http://www.westindiesyachtclub.com) in the Attitude Theme Control Panel;
    And I introduced a code to modify the copyrights and credits of the theme directly in Style.css:

    <?php

    // Remove old copyright text
    add_action( ‘init’ , ‘mh_remove_copy’ );
    function mh_remove_copy() {
    remove_action( ‘attitude_footer’ , ‘attitude_footer_info ‘, 25 );
    }

    // Add my own copyright text
    add_action( ‘attitude_footer’ , ‘mh_footer_info’ , 25 );
    function mh_footer_info() {
    $output = ‘<div class=”copyright”>’.’Copyright © [the-year] [site-link] Powered by: SUPER MARTIANS FROM MARS! ‘.'</div><!– .copyright –>’;
    echo do_shortcode( $output );
    }

    Is there is something wrong with this code ?

    Or did I put it at the wrong place ?

    If I give you the access codes, do you think you would be able to fix it for me ?

    If you are still getting errors about headers and this is what you added just before the errors started – it is caused by the line:

    echo do_shortcode( $output );

    That produces output to the visitor’s browser, which causes the headers to be created and then that prevents WP from modifying the headers as is needed.

    Did I read you correctly – you put PHP code in the style.css file?

    Wrong – put code in the themes functions.php file unless it should specifically go else where.

    Only CSS code should be put in a .css file – why do you think it is named .css?

    In this instance, if you want to add that to the bottom of each page, it should be in footer.php If you want it at the top of the pages, put it in header.php

    That’s the purpose of those files.

    In general –

    If you make ANY changes to software and errors then occur, ALWAYS remove your changes to see if they are causing the errors.

    If they are causing the errors, concentrate on those changes.

    If you ask for help somewhere, begin by describing the error or error messages and then provide any, and all, code you changed and where you changed it and any, and all, code you added and where you added it.

    No one here is physic and we can’t read your mind as to what you have done that might cause the problem you are reporting.

    I checked to see if you have replied and I reread my last reply.

    Since you are setting and removing filters and then defining a function, put that code in the theme’s functions.php file.

    Again, take out he echo statement and your can’t update headers error should be resolved.

    Let me know.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Cannot modify header information’ is closed to new replies.