Error code when logging into Wordpress.

Asked by:
mikethe8 / 32 Points
Time:
2014-03-04 11:28 pm EST
Category:
Website Troubleshooting
Hits:
402
(cpanel id: miketh8) www.mikedavisportfolio.com

Hello. I have two domains on my account.I use WordPress on both. The older domain work fine, but when I try ti log in to the other, I am getting these error codes: Hello!

On the top of the WordPress login page:
"Warning: Cannot modify header information - headers already sent by (output started at /home/miketh8/public_html/mikedavisportfolio.com/wp-content/themes/posttypes.php:2) in /home/miketh8/public_html/mikedavisportfolio.com/wp-login.php on line 415" and:

Warning: Cannot modify header information - headers already sent by (output started at /home/miketh8/public_html/mikedavisportfolio.com/wp-content/themes/posttypes.php:2) in /home/miketh8/public_html/mikedavisportfolio.com/wp-login.php on line 427

Then when I type in my username/password anyway: I get this:
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

Even though the cookies have been set correctly.

Like I said, the other domain (with WordPress) works fine. The last time I used this domain I had no problems.

What is going on hers?

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

JacobN
Staff
3,713 Points
2014-03-04 11:57 pm EST
Hello, and sorry for the troubles.

The PHP errors that you were getting are caused by trying to modify the HTML headers of a page, after they've already been sent to the visitor's browser by another script.

It looks like the error was also occurring on your main site, and was not limited to just the admin login page.

To fix this for you I moved this file:
/wp-content/themes/mdportfolio/functions.php

To a backup copy of:
/wp-content/themes/mdportfolio/functions.php-BAK

That script was requiring this script:
/wp-content/themes/posttypes.php

Which was simply using PHP to echo the phrase Hello!, and because it was trying to do this after the HTML headers had already been sent previously by the rest of WordPress it was triggering this error.

Do you know where this posttypes.php script came from? It is not a part of the core WordPress files. If it's a part of the mdportfolio theme then it shouldn't be trying to simply echo out something, or a headers error like that would happen.

Please let us know if you have any other problems or questions!

- Jacob


To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}