the problem arises if ANY whitespace occurs before the 'setcookie()' call, OUTSIDE of the <?php tags. Before sending a cookie, only other 'header' info can be sent, e.g. Header('Content-type ....');
etc...
bad example------------------
<?
/ there is a space before the tag and this will be sent to the browser as part of the html page ... /
setcookie('thiswontwork');
/*
?>
goodexample------------------------
<?
/ nothing before tag - this is ok! /
setcookie('goodcookie', 'I win');
?>
the error message is confusing though.
if still confused mail me.