setcookie("uid",$uid,time()+60*60*24);


makes a problem

ob_start();