cookies

Quevin_LLC's picture

D6 Internationalization: "Domain name only," Boost, multiple servers, and subdomains

There is a separate "primary" site (in another system [NOT Drupal]), and the Drupal site has two servers with one database on one of those servers connected to both Drupal instances. Our problem is with the two Drupal servers and DNS (domain/subdomain) settings to manage them.

One instance has a minute-by-minute CRON job running to keep the other in-synch, with rsync. Only one of those servers is open to login and edit with a subdomain pointing to it directly on the network. The other server has a read-only user setup for the database connection, just as a precaution.

2 comments · Read more

Cookies and domains...

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?

3 comments
Syndicate content