WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
Warning: Cannot modify header information - headers already sent by (output started at /forums/vb/search/searchcontroller/version.php:91) in /wp-includes/functions.php on line 862

I am not sure what this error means. Can someone help me out?

Line 862 from functions.php is...

setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH );

If any other info is needed, please let me know.

Here are lines 77-95 from version.php:

//Çàïðîñ ê íàøåìó õîñòó_3 \ Êóðëû

function geturl_3($url)


    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_HEADER, FALSE);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

    $result = curl_exec($ch);


    return $result;

share|improve this question

Well, there is some output in /forums/vb/search/searchcontroller/version.php:91. An echo, an empty line, an UTF-8 BOM or something similar.

PHP sends the response headers before the output starts, and it sends those headers just once. So you cannot send a session header later. That’s what the error message is telling you.

Remove the early output, and it’ll work again.

share|improve this answer
This is on line 91 of version.php: curl_close($ch); Should I remove that? – John Jan 31 '12 at 3:20
No, there is probably a curl_exec($ch); somewhere before. curl_close() just sets these resources free. Without more context it’s hard to tell what to do. I would ask the author of the forum software. – toscho Jan 31 '12 at 3:24
Will do, but just in case it rings a bell, I added that whole function to the original post (lines 77-91). One thing I noticed was the comment above it on the first line. It looks like spam to me. Do you think it is? – John Jan 31 '12 at 3:42
Read what curl_exec() does when CURLOPT_RETURNTRANSFER is set: It sends output to the browser. You could use ob_start() at the beginning of this function to avoid early headers. But this isn't exactly a clean way to handle this issue. – toscho Jan 31 '12 at 3:54

Open your functions.php , and verify that there is NO empty spaces or lines BEFORE the first <?php tag and none BEHIND the last closing ?> php tag. if this is not working, repeat the process for EACH theme file and plugin . that should fix your problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.