Community Forums › Forums › Archived Forums › General Discussion › Need Help! I'm having "headers already sent by" errors
Tagged: Agentpress, functions.php, headers already sent by
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by
Lauren @ OnceCoupled.
-
AuthorPosts
-
January 28, 2015 at 6:16 pm #138893
dvachon
MemberI'm running the old(er) AgentPress theme, but I believe it's the most recent of it's version.
When I get to my /wp-login.php/ page to login to my dashboard (http://www.thelinkedgroup.com/wp-login.php), I have TWO "warnings" immediately occuring and preventing me from logging in to the WP dashboard:
Warning: Cannot modify header information - headers already sent by (output started at /home/thelinkedgroup/thelinkedgroup.com/wp-content/themes/agentpress/functions.php:1) in /home/thelinkedgroup/thelinkedgroup.com/wp-login.php on line 424
Warning: Cannot modify header information - headers already sent by (output started at /home/thelinkedgroup/thelinkedgroup.com/wp-content/themes/agentpress/functions.php:1) in /home/thelinkedgroup/thelinkedgroup.com/wp-login.php on line 437
Both are referring to line 1 of my AgentPress theme's functions.php as we see. By accessing through FTP, I've gone to my functions.php (for the referred-to agentpress theme), and I have no whitespace in front the the opening php tag, and none at the end either. So, it does not appear to be a problem with whitespace on that php.
But the interesting thing is that when I then attempt to log in with my credentials on the wp-login page, the same errors stay, and 3 more are added. In addition, I'll also add that there is also another error occurs near my login fields, stating "ERROR: Cookies are blocked due to unexpected output." Here are the other 'headers already sent by' warnings that I get after an attempt to login:
Warning: Cannot modify header information - headers already sent by (output started at /home/thelinkedgroup/thelinkedgroup.com/wp-content/themes/agentpress/functions.php:1) in /home/thelinkedgroup/thelinkedgroup.com/wp-includes/pluggable.php on line 918
Warning: Cannot modify header information - headers already sent by (output started at /home/thelinkedgroup/thelinkedgroup.com/wp-content/themes/agentpress/functions.php:1) in /home/thelinkedgroup/thelinkedgroup.com/wp-includes/pluggable.php on line 919
Warning: Cannot modify header information - headers already sent by (output started at /home/thelinkedgroup/thelinkedgroup.com/wp-content/themes/agentpress/functions.php:1) in /home/thelinkedgroup/thelinkedgroup.com/wp-includes/pluggable.php on line 920
(I'll add that the hang-ups on line's 918-920 in that /pluggable.php file refer to "setcookie." Although I know that the cookies aren't likely the problem, I just wanted to add that).
I'm also getting the exact same "output started at .... /agentpress/functions.php:1" warnings on other pages that I try to access without using the "/" [backslash] in the url. But, when I then include the "/" at the end of the url, the page is retrieved and no functions.php warning occurs. (EXAMPLE: http://www.thelinkedgroup.com/home-valuation-report creates the warning. But add the "/" to the end, and it's all good... http://www.thelinkedgroup.com/home-valuation-report/ ) This might be a wholly separate issue, but just thought I'd bring it up since it's still referring to the same line in the functions.php as the other warnings.
Any help would be MORE THAN APPRECIATED!!! Thanks!
http://www.thelinkedgroup.com/wp-login.phpJanuary 28, 2015 at 8:00 pm #138899Lauren @ OnceCoupled
MemberHave you read this: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F? Did you check white space at the end of the file as well?
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
January 28, 2015 at 8:06 pm #138902dvachon
MemberThanks Lauren. Yes, I've read that article and have gone through all of that. I've also checked the whitespace at both the beginning opening php tag, as well as the closing php tag. I've also confirmed the encoding of the file is correct.
I've also reviewed other forum posts here from other users having similar issues, however, none of those seem to offer any additional help for me.Anything else you can think of? Thanks!
January 28, 2015 at 8:14 pm #138905Lauren @ OnceCoupled
MemberWithout seeing inside your file I really couldn't say. You might try opening it in a different file editor or uploading a clean version of the functions file. Your host may be willing to help you out and check some solutions as well, depending on their support.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
January 28, 2015 at 8:24 pm #138907dvachon
MemberThanks! I was actually just playing around with that myself. I edited the functions.php file in Notebook++ and then converted the file to UTF-8 without BOM encoding, then re-uploaded. That completely did the trick.
So for future reference to anyone out there with a similar issue, try converting the encoding to UTF-8 without BOM in your editor.Thanks Lauren!
January 28, 2015 at 8:26 pm #138908Lauren @ OnceCoupled
MemberGlad there's a solution here for anyone stumbling in. Thanks for coming back and sharing it!
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.