Okay, I got stuck while upgrading to RC5. The phpBB developers appear to flip flop on this issue, or maybe they don't know it's happening, but I have seen this come and go during the RC-process. In short, I can't get setcookie() to set a cookie for the domain .domain.com , I can only get it to set to domain.com (missing dot in front, which makes it a host, not a domain). If I try to force a dot in front, either PHP or the browser rejects it.
phpBB uses (from includes/session.php)
header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
But that doesn't appear to do anything in Drupal, maybe because the phpbb module runs too late?
I am also suspicious about Drupal's .htaccess and the PHP stuff that happens in the configuration file, but at least the former should affect phpBB as well.
Any ideas?
Comments
Hi I have found that this
Hi
I have found that this happens as well, but in RC4. There is a workaround and that is to just use "host", so long as the host settings match up with Drupal then there should be no problem. I have my cookie domain setting left empty (if you need to change it, do so via the adminCP and not database direct [even if it means removing the phpBB module and .htaccess temporarily]), this way the cookie is generated from host.
Jason
watch the cache
The reason you have to do it through the ACP is because of global_config.php (or something similar) in the cache directory. So we could do it automatically, in the module.
So what do people think... squash phpBBs cookie settings or ask users to modify the Drupal config? Technically, I think phpBB is doing the right thing.
Conclusion
The reason setcookie() wasnt working before was a typo I didn't catch.
I'll just get the domain cookie from the db and stick '.' in front of it, see how that works for most people.
Append related bug reports to this message, but make 100% sure that you are running RC5 and that you have updated all files of the module after the date on this post (August 27th).