I was reading about this problem in a PHP book this morning, where a similar problem is discussed. The text is about cookies and related problems, but the principle is exactly the same. I'll quote the relevant lines:
"A single space, a newline character, or any other text (whether plain HTML or printed from PHP) could be the cause of this [problem], so look over your script carefully. This also applies to any files which are included with include() or require() before the setcookie() call, or which are require(d) in the auto_prepend directive in php.ini. The HTTP response header which contains the "set_cookie" requests is sent ot the browser immediately if other output (such as text) is generated. Hence PHP cannot add the necessary information to the HTTP response header anymore, thus causing the warning message".
In other words try to invert the order of header() and require().
Bye,
S.