Here are my cookie settings. They match the forum cookie settings
// Cookie variables
// This should be set to match the path/domain for your cookies,
// / = "/"; sets the cookie to be usable throughout the site.
// .domain.com = ".domain.com"; sets the cookie to be usable across the domain
// If your BB system has a different setting, then you need to put that path here as well.
$cookie_path = "/";
$cookie_domain = ".domain.com";
// Cookie Prefix
// Right now this only applies to UBBThreads, phpBB2 or Nuke; if you have your cookies set to a custom
// prefix, set it here.