Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Problem with code, need help

         

Tempire

7:40 am on Apr 9, 2015 (gmt 0)

10+ Year Member



Hi All

After having a long break from websites, i just slowly started getting back in the game. But i have run into a small problem with the first site im working on, i get a header error message and connot login to the admin area.

Does someone know whats wrong here?:

Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/themedir/functions.php:49) in /wp-login.php on line 424 and on 437.

Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/themedir/functions.php:49) in /wp-includes/pluggable.php on line 918 (and 919, 920)


When looking at the header in ftp i canīt see anything wrong.
I added some banner code that proberly has messed it up, but i canīt see to find that now.

[edited by: lorax at 3:45 pm (utc) on Apr 9, 2015]
[edit reason] removed details [/edit]

King of Bling

12:45 pm on Apr 9, 2015 (gmt 0)

10+ Year Member



This from WP Support might help... [wordpress.org...]

devGirl

1:46 am on May 20, 2015 (gmt 0)

10+ Year Member



This is a non-critical error, and can be hidden by turning errors off in PHP:

error_reporting(0);
ini_set('display_errors', 0);

JS_Harris

4:53 pm on May 21, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My guess is that you have added code to your functions file which says to alter the HTTP header response but it kicks in after the headers have already been sent. I am referring to the HTTP headers, not the header.php section of your site.

add_filter( 'wp_headers', 'remove_x_pingback_header' );


The above would remove the wordpress pingback http header entry but if placed on a page would cause your error because the headers have been sent to the receiving browser before your page has reached this point. Look for entries anywhere on your site, or in your functions file, that references "wp_headers".

lucy24

5:52 pm on May 21, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is a non-critical error

Now, wait a minute. If the whole point of some section of code is to set a header, then it's hardly "non-critical" to find that you're not able to do so.

Here, as so often, it may be useful to lay out in English what you're trying to do. What aspect of the response headers are you trying to set or modify, and why? If you weren't aware that you were even doing anything about headers, the cure may be to remove some bit of code. (Don't physically delete it, of course! Just comment it out for now and see what changes.)

marinaweb

9:08 am on Jul 9, 2015 (gmt 0)

10+ Year Member



Look for the functions can report this kind of warning:


session_start()
setcookie
header