• Alison

    (@anonymical7)


    Hi All, still rebuilding after an attack. We are making progress, but our latest issue to restore it is that we get these errors below (I left out the site info, but the link will take you the actual site. Because of the attack I removed some info in the url error examples.)

    Warning: Cannot modify header information – headers already sent by (output started at /home/SERVERREDACTED/public_html/SITEredetacted/wp-content/themes/twentytwelve-child/functions.php:27) in /home/SERVERREDACTED/public_html/SITEredetacted/wp-includes/pluggable.php on line 1167

    Heres a link

    I replaced the pluggable.php file, and the childtheme should be just fine. It worked before, I dont know if something got corrupted in zipping and extracting but its been very frustrating.

    Also the dashboard is not showing up after logging in we see these errors.

    Warning: Cannot modify header information – headers already sent by (output started at /home/Server REDACTED/public_html/WEBSITE REDACTED/wp-content/themes/twentytwelve-child/functions.php:27) in/home/Server REDACTED/public_html/WEBSITE REDACTED/wp-login.php on line 390

    Warning: Cannot modify header information – headers already sent by (output started at /home/Server REDACTED/public_html/WEBSITE REDACTED/wp-content/themes/twentytwelve-child/functions.php:27) in/home/Server REDACTED/public_html/WEBSITE REDACTED/wp-login.php on line 403

    Other areas keep bringing up twentytwelve-child/functions.php:27
    But the functions.php has not changed from when it worked before.

    Any help would be so much appreciated.

    A

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Alison

    (@anonymical7)

    Update, Replacing the fresh wp-admin and wp-includes files. But the errors stayed.
    Could it really be just the child theme causing all this?
    I tried also disabling the plugins but the errors remained.

    A

    Thread Starter Alison

    (@anonymical7)

    Last update: I uploaded a temp index file for the moment to redirect things to the right urls. But the errors still occur. I know this can be caused by white spaces, but I have not found any.

    If anyone has a helpful different perspective it would be very helpful.

    Best, A

    Hi, the usual culprit is the php closing tag, which should be omitted. See:

    https://php.net/basic-syntax.instruction-separation

    The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

    Thread Starter Alison

    (@anonymical7)

    Thank you frasermarlow, I will try this tomorrow!

    So from what I understand looking at the error is that it is probably in the functions.php:27? Not the pluggable.php? Trying to understand how errors work and where I should look. Its not in the wp-includes folder?

    Warning: Cannot modify header information – headers already sent by (output started at /home/SERVERREDACTED/public_html/SITEredetacted/wp-content/themes/twentytwelve-child/functions.php:27) in /home/SERVERREDACTED/public_html/SITEredetacted/wp-includes/pluggable.php on line 1167

    Thank you! A*

    It could actually be in either file, as they will be calling on each other. It may even be in a different .php file altogether.

    I assume your functions.php is somewhat modified as it sits in the child-theme so take a look there.
    Assuming you have not modified functions.php then the culprit is most likely a plug-in – so check pluggable.php. If the file ends with ‘?>’ then simply remove that and any white spaces after the last line of code in the file.

    Your link above takes me to the wp-admin log-in page, so I can’t see the actual issue, but generally with this error, there isn’t much to see !

    Take a look at those files and let us know if you make progress…

    Thread Starter Alison

    (@anonymical7)

    Hello, it appears its fixed. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Warning: Cannot modify header information error’ is closed to new replies.