I know this should work, I did it with my main site. I set up some subdomains on localhost to do testing with the dev version of my site, mainly to see how things will work differently. I got the subdomains working fine, with the forum at forums.localhost. I changed the cookie and system settings so that they now look like:
cookie domain: .localhost
cookie name: phpbb3_cke
cookie path: /
domain name: forums.localhost
script path: /
I think those are the relevant bits. I guess the main problem is that cookies don't get set at all for anything. Well, there is the style_cookie for forums.localhost, but nothing else. No session cookies, user related ones, nothing. Is there an issue with doing subdomains on localhost that I'm not aware of? I was expecting to see a set of them for .localhost.
I think my next test will be to set a dummy domain up in my hosts file, and create the subdomains and such up for that in my apache config. Maybe that will work.