Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
session variable expires in IE6?
Old 06-02-2005, 04:07 PM session variable expires in IE6?
Average Talker

Posts: 22
Trades: 0
I have a login procedure on my website. It seem to work fine for almost a minute. After that the session variable looses it's value and I have to login again.

The strange part is if I go to the website in Firefox it works perfectly and I don't have to keep logging in. This seems to only happen in IE6.

I was told to check out my phpinfo and it seems fine. Someone else said it was P3P related so I started working on adding the code for that. I have that code in place but not sure it is totally working.

It's a pain for my customers to have to keep logging in after a minute or so.

Any ideas?
cgchris99 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-03-2005, 05:36 AM
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
How do you set session cookies and how do you read them next? The code please.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 06-03-2005, 11:25 AM
Average Talker

Posts: 22
Trades: 0
Found out it is a re-direct issue that cause the session value to be lost.
The code below works.

So in login.php you have this.
session_start();
....
...
$_SESSION['MyName'] = mysql_result($rs, 0, "name");
header("Location: newpage.php?PHPSESSID=".session*_id());
// without including PHPSESSID you will loose the value in MyName

Then in newpage.php the code looks like this
<?php
session_id($_GET['PHPSESSID']);
session_start();

// by setting the sessionID it works.
cgchris99 is offline
Reply With Quote
View Public Profile
 
Old 06-05-2005, 10:36 AM
merlin's Avatar
Skilled Talker

Posts: 52
Trades: 0
Just for kicks have a look at your PHP.ini file to check that the session timeout is = to "0". If not and you want to use sessions until the browser is closed you'll need to set it to "0", or you can just define the session ID as you have and continue on with your life.

Good luck
__________________
No more yankey my wankey, the Donger need food!
merlin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to session variable expires in IE6?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49357 seconds with 12 queries