This is a discussion on PHP $_SESSION Expiring in IE within the PHP General forums, part of the PHP Programming Forums category; Hello, I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch and a dynamic weather system, a simple session login would be the least of my problems right? Wrong. It would appear that for Mozilla and Opera keep a $_SESSION is not an issue and the $_SESSION is continued until the member logs out. However when members are using Internet Explorer browser (most versions it seems), they can go around the site for varied amounts of time, usually less than five 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. REF. All login information is saved as such: session_save_path("$path/sessions"); session_start(); $_SESSION['session_memberID']=$session_memberID; $_SESSION['session_username']=$session_username; $_SESSION['session_groupID']=$membergroup; In Fellowship, Tarrant |
|
|||
|
I use sessions with IE all the time without such a problem. Are there any
points in the program that redirect the user off site and back or something with that affect that IE might be handling in a wierd way? Do you have pages that detect the browser and feed alternate content based on the browser? If so do you always run the session_start before these checks? -----Original Message----- From: Tarrant Costelloe [mailto:taz@tazonline.org] Sent: Saturday, January 03, 2004 10:27 AM To: php-general@lists.php.net Subject: [php] PHP $_SESSION Expiring in IE Hello, I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch and a dynamic weather system, a simple session login would be the least of my problems right? Wrong. It would appear that for Mozilla and Opera keep a $_SESSION is not an issue and the $_SESSION is continued until the member logs out. However when members are using Internet Explorer browser (most versions it seems), they can go around the site for varied amounts of time, usually less than five 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. REF. All login information is saved as such: session_save_path("$path/sessions"); session_start(); $_SESSION['session_memberID']=$session_memberID; $_SESSION['session_username']=$session_username; $_SESSION['session_groupID']=$membergroup; In Fellowship, Tarrant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
"Are there any points in the program that redirect the user off site and
back or something with that affect that IE might be handling in a weird way?" Nope "Do you have pages that detect the browser and feed alternate content based on the browser?" Nope "do you always run the session_start before these checks?" Yes. The only other thing I guess it could be is the .htaccess mod_rewrite maybe? It's just weird that Internet Explorer is the only browser that seemingly looses the members $_SESSION where as Mozilla is not effected whatsoever. In Fellowship, Tarrant -----Original Message----- From: Larry Brown [mailto:larry.brown@dimensionnetworks.com] Sent: 03 January 2004 16:34 To: Tarrant Costelloe; PHP List Subject: RE: [php] PHP $_SESSION Expiring in IE I use sessions with IE all the time without such a problem. Are there any points in the program that redirect the user off site and back or something with that affect that IE might be handling in a wierd way? Do you have pages that detect the browser and feed alternate content based on the browser? If so do you always run the session_start before these checks? -----Original Message----- From: Tarrant Costelloe [mailto:taz@tazonline.org] Sent: Saturday, January 03, 2004 10:27 AM To: php-general@lists.php.net Subject: [php] PHP $_SESSION Expiring in IE Hello, I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch and a dynamic weather system, a simple session login would be the least of my problems right? Wrong. It would appear that for Mozilla and Opera keep a $_SESSION is not an issue and the $_SESSION is continued until the member logs out. However when members are using Internet Explorer browser (most versions it seems), they can go around the site for varied amounts of time, usually less than five 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. REF. All login information is saved as such: session_save_path("$path/sessions"); session_start(); $_SESSION['session_memberID']=$session_memberID; $_SESSION['session_username']=$session_username; $_SESSION['session_groupID']=$membergroup; In Fellowship, Tarrant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
Have you tried the header(Cache-control: private) workaround for IE6? I
seem to remember reading something about that on one of the web dev sites (devshed probably). Use that immediately after session_start() and see if it makes a difference. Kirk "Tarrant Costelloe" <taz@tazonline.org> wrote in message news:000001c3d220$8c95f490$57a50050@hobbit... > "Are there any points in the program that redirect the user off site and > back or something with that affect that IE might be handling in a weird > way?" > > Nope > > "Do you have pages that detect the browser and feed alternate content > based on the browser?" > > Nope > > "do you always run the session_start before these checks?" > > Yes. > > The only other thing I guess it could be is the .htaccess mod_rewrite > maybe? It's just weird that Internet Explorer is the only browser that > seemingly looses the members $_SESSION where as Mozilla is not effected > whatsoever. > > In Fellowship, > Tarrant > > -----Original Message----- > From: Larry Brown [mailto:larry.brown@dimensionnetworks.com] > Sent: 03 January 2004 16:34 > To: Tarrant Costelloe; PHP List > Subject: RE: [php] PHP $_SESSION Expiring in IE > > > I use sessions with IE all the time without such a problem. Are there > any points in the program that redirect the user off site and back or > something with that affect that IE might be handling in a wierd way? Do > you have pages that detect the browser and feed alternate content based > on the browser? If so do you always run the session_start before these > checks? > > -----Original Message----- > From: Tarrant Costelloe [mailto:taz@tazonline.org] > Sent: Saturday, January 03, 2004 10:27 AM > To: php-general@lists.php.net > Subject: [php] PHP $_SESSION Expiring in IE > > > Hello, > > I have recently launched the new Planet-Tolkien.com, one would think > that writing a message board from scratch and a dynamic weather system, > a simple session login would be the least of my problems right? Wrong. > > It would appear that for Mozilla and Opera keep a $_SESSION is not an > issue and the $_SESSION is continued until the member logs out. However > when members are using Internet Explorer browser (most versions it > seems), they can go around the site for varied amounts of time, usually > less than five 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. > > REF. All login information is saved as such: > > session_save_path("$path/sessions"); > session_start(); $_SESSION['session_memberID']=$session_memberID; > $_SESSION['session_username']=$session_username; > $_SESSION['session_groupID']=$membergroup; > > In Fellowship, > Tarrant > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
Doesn't seem to have solved the problem... My session include file at
the top of all documents looks like: session_save_path("$some_path/sessions"); ini_set('session.use_cookies', 1); ini_set('session.gc_probability', 1); ini_set('session.gc_maxlifetime', 60 * 60); ini_set('session.auto_start', '1'); session_start(); header("Cache-control: private"); Here is a link to my PHP configuration: http://www.planet-tolkien.com/test.php In Fellowship, Tarrant -----Original Message----- From: Kirk Babb [mailto:kbcd@comcast.net] Sent: 03 January 2004 21:13 To: php-general@lists.php.net Subject: Re: [php] PHP $_SESSION Expiring in IE Have you tried the header(Cache-control: private) workaround for IE6? I seem to remember reading something about that on one of the web dev sites (devshed probably). Use that immediately after session_start() and see if it makes a difference. Kirk "Tarrant Costelloe" <taz@tazonline.org> wrote in message news:000001c3d220$8c95f490$57a50050@hobbit... > "Are there any points in the program that redirect the user off site > and back or something with that affect that IE might be handling in a > weird way?" > > Nope > > "Do you have pages that detect the browser and feed alternate content > based on the browser?" > > Nope > > "do you always run the session_start before these checks?" > > Yes. > > The only other thing I guess it could be is the .htaccess mod_rewrite > maybe? It's just weird that Internet Explorer is the only browser that > seemingly looses the members $_SESSION where as Mozilla is not > effected whatsoever. > > In Fellowship, > Tarrant > > -----Original Message----- > From: Larry Brown [mailto:larry.brown@dimensionnetworks.com] > Sent: 03 January 2004 16:34 > To: Tarrant Costelloe; PHP List > Subject: RE: [php] PHP $_SESSION Expiring in IE > > > I use sessions with IE all the time without such a problem. Are there > any points in the program that redirect the user off site and back or > something with that affect that IE might be handling in a wierd way? > Do you have pages that detect the browser and feed alternate content > based on the browser? If so do you always run the session_start > before these checks? > > -----Original Message----- > From: Tarrant Costelloe [mailto:taz@tazonline.org] > Sent: Saturday, January 03, 2004 10:27 AM > To: php-general@lists.php.net > Subject: [php] PHP $_SESSION Expiring in IE > > > Hello, > > I have recently launched the new Planet-Tolkien.com, one would think > that writing a message board from scratch and a dynamic weather > system, a simple session login would be the least of my problems > right? Wrong. > > It would appear that for Mozilla and Opera keep a $_SESSION is not an > issue and the $_SESSION is continued until the member logs out. > However when members are using Internet Explorer browser (most > versions it seems), they can go around the site for varied amounts of > time, usually less than five 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. > > REF. All login information is saved as such: > > session_save_path("$path/sessions"); > session_start(); $_SESSION['session_memberID']=$session_memberID; > $_SESSION['session_username']=$session_username; > $_SESSION['session_groupID']=$membergroup; > > In Fellowship, > Tarrant > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
IE and Moz have different JAVA script engines. Try turning off JAVA and
see if IE maintains it's session. Tarrant Costelloe wrote: >Hello, > >I have recently launched the new Planet-Tolkien.com, one would think >that writing a message board from scratch and a dynamic weather system, >a simple session login would be the least of my problems right? Wrong. > >It would appear that for Mozilla and Opera keep a $_SESSION is not an >issue and the $_SESSION is continued until the member logs out. However >when members are using Internet Explorer browser (most versions it >seems), they can go around the site for varied amounts of time, usually >less than five 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. > >REF. All login information is saved as such: > >session_save_path("$path/sessions"); >session_start(); $_SESSION['session_memberID']=$session_memberID; >$_SESSION['session_username']=$session_username; >$_SESSION['session_groupID']=$membergroup; > >In Fellowship, >Tarrant > > |
|
|||
|
Guess I'm being nosy here, so forgive me, but why are you settting an
alternate save path and using ini_set at the start of each document? I know that has nothing to do with the problem, but I was just wondering. Are you hosting multiple sites off your server and have different session settings depending on the site? -Kirk > session_save_path("$some_path/sessions"); > ini_set('session.use_cookies', 1); > ini_set('session.gc_probability', 1); > ini_set('session.gc_maxlifetime', 60 * 60); > ini_set('session.auto_start', '1'); > session_start(); > header("Cache-control: private"); > > Here is a link to my PHP configuration: > http://www.planet-tolkien.com/test.php > > In Fellowship, > Tarrant |