Q:

when domain is specified the cookie is not generated

i'm trying to configure the subdomains for a cookie for a old application in the place where start the session i've configurated like following
<? php
  //...
  session_set_cookie_params(0, '/', '.local', false, false);
  session_name('myapp');
  session_start();

i want share the cookie for a.local and b.local domains but when i set the domain to '.local' the cookie isn't genearate
if I set to  '' the domain the cookie is generate again i dont know why? 

A:

I think you cannot set cookies for a whole TLD.  It would be a large security risk if it were possible to set a cookie for all .com-domains.