php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26950 PHP $_SESSION Expiring in IE 6/*
Submitted: 2004-01-17 19:04 UTC Modified: 2004-01-18 11:30 UTC
From: taz at madfolk dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: taz at madfolk dot com
New email:
PHP Version: OS:

 

 [2004-01-17 19:04 UTC] taz at madfolk dot com
Description:
------------
Dear Whomever,

I have recently launched the new Planet-Tolkien.com.

It would appear that for Mozilla and Opera keeping a $_SESSION is not an issue and the $_SESSION is continued until the member logs out. However when members are using Internet Explorer browser 6 (and maybe other versions), they can go around the site for varied amounts of time, usually less than five to ten minutes and then their $_SESSION will expire!!??

I cannot for the life of me figure out why a server side $_SESSION would expire on IE but not for MOZ or Opera but it is, and I need to figure out why and how can I fix this.

I have read a similar bug report with reference to this, about hostnames having underscores in them, but this is not the problem in our case.

REF. All login information is saved as such:

session_save_path("$path/sessions");
session_start();
//store member session information
$session_memberID=$row[id];
$session_username=$row[username];
$session_groupID=$row[membergroup];
session_register("session_memberID");
session_register("session_username");
session_register("session_groupID");
//$_SESSION['session_memberID']=$session_memberID;
//$_SESSION['session_username']=$session_username;
//$_SESSION['session_groupID']=$membergroup;

Please please please help, I truelly have tried everything!

In Fellowship,
Tarrant

Reproduce code:
---------------
// EXAMPLE CODE 1: 
// member login successfull so register sessions

session_save_path("$path/sessions");
session_start();
//store member session information
$session_memberID=$row[id];
$session_username=$row[username];
$session_groupID=$row[membergroup];
session_register("session_memberID");
session_register("session_username");
session_register("session_groupID");
//$_SESSION['session_memberID']=$session_memberID;
//$_SESSION['session_username']=$session_username;
//$_SESSION['session_groupID']=$membergroup;

// EXAMPLE CODE 2: check member is logged in
Function checkLoginIn() {
	if(!isset($_SESSION['session_memberID'])) {
		return false;
	} else {
		return true;
	}
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-17 19:19 UTC] tomsommer@php.net
try:

<?php
session_start();
$_SESSION['session_memberID'] = $row[id];
$_SESSION['session_username'] = $row[username];
$_SESSION['session_groupID'] = $row[membergroup];
?>

as the documentation says:
 If you are using $_SESSION  (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister().

The above example will do the same thing - try it.
 [2004-01-17 21:19 UTC] taz at madfolk dot com
No, same problem. And the commented out session code did that previous btw here..

//$_SESSION['session_memberID']=$session_memberID;
//$_SESSION['session_username']=$session_username;
//$_SESSION['session_groupID']=$membergroup;

However anyway, no... still getting logged out in IE.
 [2004-01-18 10:10 UTC] sniper@php.net
It's either bug in IE or bug in your code.
Similar stuff (when coded correctly) works fine.
For example several webshops I've done..

 [2004-01-18 11:30 UTC] taz at madfolk dot com
That is helpful... 

I too have writen many website using such a system and had no problems whatsoever.

The only difference with this site is it is using mod_rewrite.

Can anyone be of more constructive assitance please?

note: PHP information, http://www.planet-tolkien.com/test.php
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 14 07:01:27 2025 UTC