Comprueba que en
entrar.php no haya ninguna salida antes de ejecutar
setcookie http://www.php.net/manual/es/function.setcookie.php Cita: If output exists prior to calling this function, setcookie() will fail and return FALSE. If setcookie() successfully runs, it will return TRUE. This does not indicate whether the user accepted the cookie.