Drupal Session handling for multiple subdomains
Submitted by Chad on Sat, 08/04/2007 - 7:51am.
- Tech
If you are having problems with cookies for multiple sites on the same web server running drupal, make sure the following session pass drug test handlers are in the settings.php files for your site configuration.
I searched the drupal site thoroughly and found this thread, which lead me to my settings change.
Here are the changes I made for each of my multiple drupal driven laptop battery subdomains in settings.php
ini_set('session.name', 'PHPSESSID');<br /> ini_set('session.cookie_domain', '.example.com');<br /> ini_set('session.cookie_secure', 0);
Where PHPSESSID is your unique cookie identifier (ex: MYUNIQUEID) and .example.com = your fully qualified domain name, including any subdomain prefix.
- Chad's blog