Login Issues

IAmNos - March 21, 2007 - 16:19

I was trying to reply to this thread: http://drupal.org/node/115889 but apparently its closed.

In any case, I'm experiencing that issue. I'm running Drupal 5.1 with PHP 5.1.6 under Apache 2.0 on CentOS4.4.

The workaround or fix that I've found is to remove the session_regenerate_id() function, or at least comment out everything it does:

function sess_regenerate() {
  $old_session_id = session_id();

  // We code around http://bugs.php.net/bug.php?id=32802 by destroying
  // the session cookie by setting expiration in the past (a negative
  // value).  This issue only arises in PHP versions before 4.4.0,
  // regardless of the Drupal configuration.   // TODO: remove this when we require at least PHP 4.4.0
  if (isset($_COOKIE[session_name()])) {     setcookie(session_name(), '', time() - 42000, '/');
  }

  session_regenerate_id();

  db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", session_id(), $old_session_id);
}

My question though, is what are the consequences of not having this function run. Nothing is immediate apparent when using my drupal site, but I'm just wondering if there's a security or other issue that I haven't thought of, or encountered yet.

Hi, I am having the same

lobotomir - March 29, 2007 - 12:40

Hi,

I am having the same problem with the same configuration (only Fedora instead of CentOS). I've been trying the various fixes listed on the threads, and nothing seems to work. The code you posted appears in session.inc, I commented it out, and the IE and Safari login bug persists. Firefox works just fine.

I tried commenting outsess_regenerate() from user.module, adding $GLOBALS['tempUser'] = $user;to index.php... nothing.

Did the fix that you mentioned work for you? If yes, did you make any other changes (changed source code, applied patches, etc.) before or after that? I sure could use some pointers :) .

Thanks in advance.

Problem is revisiting me...

audrey - March 29, 2007 - 15:46

I struggled with this problem last month and got things working by enabling clean URLs...
however the problem has reappeared this morning for both IE6 and IE7 browsers (it still works fine with FireFox).

I'm not sure what to think or do at this point....

 
 

Drupal is a registered trademark of Dries Buytaert.