• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Need Help! I'm having "headers already sent by" errors

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Need Help! I'm having "headers already sent by" errors

This topic is: not resolved

Tagged: Agentpress, functions.php, headers already sent by

  • This topic has 5 replies, 2 voices, and was last updated 8 years ago by Lauren @ OnceCoupled.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 28, 2015 at 6:16 pm #138893
    dvachon
    Member

    I'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.php
    January 28, 2015 at 8:00 pm #138899
    Lauren @ OnceCoupled
    Member

    Have 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 #138902
    dvachon
    Member

    Thanks 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 #138905
    Lauren @ OnceCoupled
    Member

    Without 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 #138907
    dvachon
    Member

    Thanks! 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 #138908
    Lauren @ OnceCoupled
    Member

    Glad 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

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble