After the upgrade to 5.0 Final today, drupal will not login with Safari. Firefox is working fine though. Has this been an issue for anyone else?

Comments

ch1mjw’s picture

Safari fine for me

ktonini’s picture

Ok its working now, don't know what was up with that. Probably a cache issue or something.

LansingIT’s picture

I also can't login using Safari, on Two seperate Macs.
Hmmmmm.

Anyone else? Ideas
Firefox, Flock are fine.

BK

osiris24x’s picture

I'm having the exact same problem. I can't log in to Drupal 5.0 under Safari, but Firefox works fine. I tried clearing the cache and restarting, to no avail.

Roger Michaels
Macintosh Consultant
www.mymacfix.com

saltiredj’s picture

I have the same problem. I tried clearing the cache - nothing. I reset Safari - nothing. I even tried restarting the computer. Nothing.

Sigh.

stop14’s picture

i get the same problem on Safari 2.0.4, though i can log in fine in firefox. it doesn't seem like drupal 5 is writing the PHPSESSID cookie in Safari. one is generated in firefox immediately.

can anyone else reproduce this as the issue?

(oddly, i was accessing drupal 5 in safari just after i upgraded. perhaps 4.7 session never closed and all was fine. only after logout could i not get back in.)

stop14’s picture

the issue seems to be related to the 'session.cookie_domain' php ini setting in settings.php . there is some discussion here that pointed me in this direction: http://drupal.org/node/108663 , and there's actually a note in the settings.php that addresses the problem:

/**
 * We try to set the correct cookie domain. If you are experiencing problems
 * try commenting out the code below or specifying the cookie domain by hand.
 */
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);
  }
}

ini_set('session.cookie_domain', 'your.address.here');

some of the issues might be related to the fact that i'm currently using an I.P. address for this particular installation.

Pisco’s picture

I was playing around with drupal on localhost (127.0.0.1) when I suddenly started experiencing this problem. Commenting out the above mentioned code solved the problem for me.

aether’s picture

Ditto. Can't login with Safari. Firefox is OK.

Jeff Tomlinson

ArcheyLopez’s picture

Same here.

I have a drupal version installed on my local machine (MacOSX, Apache 1.2, PHP 5) where I cannot log in. On the other hand I can login to a drupal a friend of mine setup on a remote server... any ideas?

brettfromtibet’s picture

Can't login to Drupal in Firefox 2.0 or Safari! Before Safari worked, but not Firefox.
Now, neither one works!

I tried clearing cookies, restarting the machine, and everything.

Any ideas?

brettfromtibet’s picture

Okay.. I am able to log in. Here is what I discovered on my Max OS X with MAMP, and Drupal installed on the local server:

The only way I can login it to use the word "localhost" in the URL. Firefox won't use the word "localhost" by default, it only take 127.0.0.1 Here's what happens

http://127.0.0.1:8888/drupal51 - This brings up the screen, accepts the correct login/pw, but does
will not bring up an admin screen.

http://localhost:8888/drupal51 - Brings up the same screen. Logs in perfectly.

So now I can get in only under Safari. But at least I'm in. Any clues for this n00b on how to sort this issue out?

brettfromtibet’s picture

Rob_Feature’s picture

Ok, I'm on Safari and having the same issue:

I built the site on MAMP, and had no issues with Safari...but at the time, I was using a MAMP URL (not a local IP address), so it was fine...

Then, I uploaded to my remote server, where I'm currently forced to browse using an IP address. At this point, I can't log in.

I'm thinking this has something to do with using an IP as the address instead of a domain name...although I'm not geeky enough to understand why....

/**
  * Bob Christenson
  * Mustardseed Media
  * http://mustardseedmedia.com
  */
DocMartin’s picture

Log in fine w Safari to a site I've built.

But not to drupal.org just now (was initially ok). I hit "log in", but after a while, just back to same page, w name and passoword fields filled in. Tried deleting drupal cookie; no use.

Fine with Firefox 2.

____________________________
DocMartin and Hong Kong Outdoors

coolin’s picture

I have the same problem:
server - ubuntu-drupal
client mac-firefox:ok
client mac-safari: login returns the same page

is there some solution??
colin

jonathanwinn’s picture

I was administering with Safari when I first installed 5, but when I logged off the first time, I was never able to log back in with Safari. So, now I'm using Firefox, but I obviously want the site to be usable with Safari. I read about the cookie issue above, and can report that I've even tried to reset Safari, which deletes all cookies, history, and cache, and still cannot login.

themoors’s picture

I am unable to login to my own sites using safari, additionally today I tried to login to drupal.org with safari and the same problem occurs.

Odd...

Hoff’s picture

Safari logins fail here. Reliable. You can't get into the site with Safari. At all.
Firefox works.
Drupal 5.1.
Safari 2.0.4
Firefox 2.0.0.3
IP (Numeric) site address.

I've pawed at the session cookie id name and have managed to stuff up Firefox, and have reverted back.

Hoff’s picture

Ok; FWIW, I've found a fix that seems to work from Safari 2.0.4 and from Firefox 2.0.0.3 on Mac OS X, and from MSIE6 on Windows XP.

This with a static non-private IP address for the Drupal site.

Various of the fixes tried derail one or more of the other browsers.

Symptoms: the PHPSESSID cookie was not making it back into Safari for some reason, so the watchdog would show a successful login, but — with no cookie around — the subsequent traffic goes into the weeds. The session login cookie is effectively immediately lost. (Barring the availability of a tool akin to the Firefox Web Developer Toolbar available within Safari, chasing this stuff in Safari is seemingly mildly ugly — even with the “defaults write com.apple.Safari IncludeDebugMenu 1” Safari browser debug mode enabled.)

The fix that seems to work: find the block of PHP in settings.php that sets the session cookie domain, and comment out the whole block. The following is an example of the resulting section of the file:

/** 
 * We try to set the correct cookie domain. If you are experiencing problems
 * try commenting out the code below or specifying the cookie domain by hand.
 */ 
# 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);
#   }
# }

There are various apparently-related threads, see 6696 and 126557, among others.

Testing continues.

shayne-1’s picture

Setting the Base URL & commenting out the setting.php code for the session cookie domain works for me too.

Not sure why this is happening. However, like others, I'm using Safari 2.0.4 and developed the site locally, using MAMP. It's quite odd that I can login to the local site using Safari, but not the remote server install. They're identical sites.

Thanks for the troubleshooting everyone.

rooey’s picture

Just a note, I'd been having this problem - I chased it down to the server time having been reset to 1970 !

DOH!