A couple of hints...

While the header problem isn't resolved you can put error_reporting(E_NONE) or error_reporting(0), that eliminates all error and warning messages from the output.

Another hint could be to put at the top of your function file this code:

Code:
if (eregi("functions.php",$_SERVER['PHP_SELF'])) {
    Header("Location: ../index.php");
    die();
}
that prevents direct loading of your function file by redirecting to main page.