so there is no cookie in your cache? that would seem to be a pretty reliable indication the cookies are not being set.
if i were you, i would start with a super simple test page and get it to set cookies reliably. THEN implement the ob_start() stuff and some echo statements. when you get that working, then think about bringing in your other code.
if you haven't read the documentation on the functions you are using, i would recommend that you do so.
persistence will make it happen.
and lastly, i only offer this very BAD solution because you seem frustrated. set a cookie with javascript. you could echo this at any point while your page is outputting and the cookie should get set via javascript when the script runs.
<script language="Javascript">
<!--
function writeCookie(name, value, hours)
{
var expire = "";
if(hours != null)
{
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = "; expires=" + expire.toGMTString();
}
document.cookie = name + "=" + escape(value) + expire;
}
writeCookie("cookie_name", "my_value", some_number_of_hours);
//-->
</script>