IE Login Problem Drupal 5.X
Classic Symptoms:
- Log on screen returned after logging on.
- Could not access admin.
- Clearing cookies did NOT fix problem in IE.
- Firefox login worked fine.
The fix
In the current version of your settings.php
file, you may see some code:
if (isset($_SERVER['HTTP_HOST'])) {
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
// Per RFC 2109, cookie domains must contain at least one dot
// other than thefirst. For hosts such as 'localhost',
//we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
ini_set('session.cookie_domain', $domain);
}
}
As the instructions say, try commenting out the code and replace it with:
ini_set('session.cookie_domain', 'yourdomain.com');
Where yourdomain.com
is your domain. For example, for my website, I would put:
ini_set('session.cookie_domain', 'wanderings.net');
Worked like a charm!
Source
Related Posts
Computers Drupal
— 28 August 2007, 05:31
Hi,
Trying to sort out my login problem.
Opened the file but was not sure what needs to got where.
ini_set('session.cookie_domain', 'mydomain.org');
Does this mean
ini_set('session.cookie_www.udongo.org', 'udongo.org');
For example or?
Brent? — 01 September 2007, 06:37
Not quite. The only customized portion of the line is "mydomain.org". The "session.cookie_domain" remains as is. So for my site I had to put in my setting.php file:
ini_set('session.cookie_domain', 'wanderings.net');
In the current version of your settings.php file, you may see some code:
if (isset($_SERVER['HTTP_HOST'])) {
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost', we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
ini_set('session.cookie_domain', $domain);
}
}
As the instructions say, try commenting out the code and replace it with:
ini_set('session.cookie_domain', 'yourdomain.com');
Hope that helps!
Brent
Cool. Solved my problem. Thanks!