• Resolved Hal

    (@ricaglobal)


    I can’t log into wp-admin. Here’s the error message: Warning: Cannot modify header information – headers already sent by (output started at /home/content/42/12781042/html/wp-content/themes/megahost/inc/extra-codes/extra-functions.php:119) in /home/content/42/12781042/html/wp-login.php on line 414.

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/42/12781042/html/wp-content/themes/megahost/inc/extra-codes/extra-functions.php:119) in /home/content/42/12781042/html/wp-includes/pluggable.php on line 883

    I’ve read the thread here but none seems to help. Can someone help? Thanks.

Viewing 15 replies - 1 through 15 (of 32 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via FTP or SFTP, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter Hal

    (@ricaglobal)

    Thanks MacManX. I’m going to try that.

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    Thread Starter Hal

    (@ricaglobal)

    James,

    It’s me again. I followed the link to manually reset plugins and renamed the plugins folder to plugins.hold then I tried to log into wp-admin and this is the error I get:

    Fatal error: Call to undefined function of_get_option() in /home/content/42/12781042/html/wp-content/themes/megahost/functions.php on line 194

    Then I renamed the folder to its old name. And it brought me back to where I started.

    Thread Starter Hal

    (@ricaglobal)

    James, here’s something I have noticed on my site. Please bear with me because I’m not highly technical, so I try to be descriptive.

    The whole web site works as a whole, except a set of internal links that I had created. I do believe that they refer to a script that is not properly referenced (???). I had just copied a table codes from another one of my friend’s sites who was helping me understand how to do something. I copied the codes into a page.

    On The two pages where I had the tables – each of those links gives me the following error when I click on them:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/42/12781042/html/wp-content/themes/megahost/inc/extra-codes/extra-functions.php:119) in /home/content/42/12781042/html/wp-includes/pluggable.php on line 1121

    The problem now is I don’t know how to go in there and either delete or review since I can’t log into wp-admin.

    Sorry this is quite long but I guess I am sharing whatever happened leading to these troubles. Hopefully you can help me or someone can point me to the right direction.

    Thanks for your patience.

    Moderator James Huff

    (@macmanx)

    Ok, so it wasn’t the plugins. Now, try the second thing I suggested. ??

    Hello Hal,

    It’s wrong with the file extra-functions.php in your theme ‘megahost’
    Did you make some change in that file – adding filter, hooks, action or?

    Sometimes it can also be a blank line in the file, which produces a result of a header already sent error.

    [sig moderated; see https://codex.www.ads-software.com/Forum_Welcome#Signatures }

    Thread Starter Hal

    (@ricaglobal)

    Thanks technicaldk. I do not recall touching the extra-functions.php file. I actually have already cleared all the whitespaces from that file, but no change. I am going to try MacManX (James’) second idea and see what it gives me. Thanks all for the ideas.

    You probably have white space at the beginning or end of your functions or extra-functions.php file.

    https://codex.www.ads-software.com/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    Moderator James Huff

    (@macmanx)

    Or rather on line 119 of /wp-content/themes/megahost/inc/extra-codes/extra-functions.php

    See the “Interpreting the Error Message” section there.

    Thread Starter Hal

    (@ricaglobal)

    Hi MacManX (James),

    I renamed the theme folder, and suddenly I can log into the wp-admin. WOW! Thanks. Now, can you tell me what to do next? Is there anything I need to look at and / or fix? Is this folder going to stay like that with the new name? What do you think caused the problem and how can I fix it?

    Thanks again for your assistance.

    Moderator James Huff

    (@macmanx)

    Yep, take a look at the guide Evan linked to above. The problem is on line 119 of /wp-content/themes/megahost/inc/extra-codes/extra-functions.php

    Thread Starter Hal

    (@ricaglobal)

    Okay. I will do that. Right now, when I go to a browser try to go to the web site, I am starring at a blank page. Is this what you would have expected? Meanwhile, I am going to look at Evan’s recommendation. I did take a look at that file, at line 119, but I am not I even see what is wrong there. Like I said, I am not technical.

    Here’s what line 119 looks like:

    echo ‘<style>’.$style.'</style>’;

    And here’s the lines around it:

    117
    118 if(of_get_option(‘general_skin_color_ch’)){
    119 echo ‘<style>’.$style.'</style>’;
    120 }
    121 $style = ”;
    122

    I already removed the whitespaces at the top and at the bottom of the page. Lines 117 & 122 are blank. Must I remove those whitespaces as well?

    I apologize again for being detailed. I am learning and am trying to understand clearly.

    Thanks again.

    Thread Starter Hal

    (@ricaglobal)

    Everyone, everything seems to work now. I renamed the theme fold back to its original name and both the dashboard and the site are up and running. Thanks everyone for your patience and input.

    Moderator James Huff

    (@macmanx)

    Perfect, I’m glad you found a solution. ??

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Can't log into wp/admin’ is closed to new replies.