0

I have a blog at: http://www.techonomic.com/

I created my own theme, and after porting to a new host, I get the following messages while trying to log in:

Warning: Cannot modify header information - headers already sent by (output started at /customers/c/5/c/techonomic.com/httpd.www/wp-content/themes/techonomic/functions.php:59) in /customers/c/5/c/techonomic.com/httpd.www/wp-includes/functions.php on line 861

Warning: Cannot modify header information - headers already sent by (output started at /customers/c/5/c/techonomic.com/httpd.www/wp-content/themes/techonomic/functions.php:59) in /customers/c/5/c/techonomic.com/httpd.www/wp-includes/functions.php on line 862

The trouble is, its hard to tell whats on those lines because funtions.php is only about 100 lines long, but obviously the code is making it longer when executed.

thanks for your help

3
  • 2
    this has been asked and answered around 10 billion times, search first please. Commented May 8, 2012 at 21:13
  • Thanks, but I have done a search, but most of the issues I found are either specific to their code or I can't understand what they mean, and dont want to jump on an old thread to ask. Commented May 8, 2012 at 21:18
  • no output before headers, end of story. Commented May 8, 2012 at 21:19

2 Answers 2

1

Open up the file /customers/c/5/c/techonomic.com/httpd.www/wp-content/themes/techonomic/functions.php, go to line 59, and figure out what is outputting data before the headers are sent. It could be an error message for a failing function call, or any number of other things outputting data prematurely.

Bottom line: You cannot output any data to the browser before trying to change the HTTP headers.

Sign up to request clarification or add additional context in comments.

Comments

1

Turn on output buffering. You probably have it disabled on your new server

4 Comments

I found a page online that said to use "php_value output_buffering 1" in htaccess, so i did and it appears to have not made any difference?
output buffering, is a hack, fix it properly.
Read this. stackoverflow.com/questions/4620977/php-output-buffering But I do agree with @Dagon If at all possible, fix it properly before messing with output buffering
yes i was being simple, there is a place for output buffering, have used it, will use it, but 99.99% of the time for the headers already sent error, this is not the best solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.