My safari version is 2.0.4
e.g. I have a localhost drupal(my ip is 192.168.1.180) , login in URL like http://localhost/drupal work fine, but can't login in when the URL changed to Http://192.168.1.180/drupal, the same URL in Firefox also work. and access another drupal5.1 host(URL: http://192.168.1.181/drupal) in safari has the same problem.
Pardon, but I am moving this back to bug reports. I have had a few users on my sites contacting me with login issues in 5.1. The only theme I could find between them is that they were all using Safari. Nobody has reported troubles with other browsers.
On the other hand, there are users with Safari who are having no trouble - is it perhaps specific releases of Safari that are having trouble?
Try commenting out the following code from your settings.php (sites/default/settings.php):
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);
}
}
This code for http://192.168.1.181/drupal will set session.cookie_domain to '.192.168.1.181', which my konqueror dose not like too (and clear cookies). Does this help?
I just wasted a lot of time finding this new bit of code that prevents me from logging in entirely from any browser on my test server.
In my case, I suspect it has something to do with the fact that my server is running on an alt port(http://foo.bar.com:8080). Code that relies on the host string never seems to take into account the possibility of an alt port.
Comments
Comment #1
dsp1 commentedI have drupal 5.1 and no problem with safari.
I don't think it is a bug.
what exactly is your setup? what version of safari? more details so someone can help.
Comment #2
nickchow commentedMy safari version is 2.0.4
e.g. I have a localhost drupal(my ip is 192.168.1.180) , login in URL like http://localhost/drupal work fine, but can't login in when the URL changed to Http://192.168.1.180/drupal, the same URL in Firefox also work. and access another drupal5.1 host(URL: http://192.168.1.181/drupal) in safari has the same problem.
Comment #3
brianV commentedPardon, but I am moving this back to bug reports. I have had a few users on my sites contacting me with login issues in 5.1. The only theme I could find between them is that they were all using Safari. Nobody has reported troubles with other browsers.
On the other hand, there are users with Safari who are having no trouble - is it perhaps specific releases of Safari that are having trouble?
Also see http://drupal.org/node/109775, http://drupal.org/node/120900
Comment #4
mr700 commentedTry commenting out the following code from your settings.php (sites/default/settings.php):
This code for http://192.168.1.181/drupal will set session.cookie_domain to '.192.168.1.181', which my konqueror dose not like too (and clear cookies). Does this help?
Comment #5
harry slaughterIt's not just safari this causes problems with.
I just wasted a lot of time finding this new bit of code that prevents me from logging in entirely from any browser on my test server.
In my case, I suspect it has something to do with the fact that my server is running on an alt port(http://foo.bar.com:8080). Code that relies on the host string never seems to take into account the possibility of an alt port.
Comment #6
mr700 commented3-4 days ago I saw a bug report regarding the port number, just can't find it now...
Explicitly defining new cookie and host name for each Drupal instance is the current workaround that works for me.
Comment #7
brianV commentedSupport requrest for a long obsolete version of Drupal.