Forum Moderators: coopster

Message Too Old, No Replies

IE6, popup, and lost sessions...

IE6, popup, and lost sessions...

         

mikestibe

1:54 am on May 10, 2003 (gmt 0)

10+ Year Member



Hi all,

I'm invloved in the development of a PHP application and I'm having a frustrating problem. In my install of IE6
(most recent version, fully patched) I'm 'randomly' losing sessions when a popup is opened a second time.

The popup auto-fills some database (mySQL) info into the parent window and about 80% of the time if I close the window and reopen it, I get logged out of the system and the login page loads in the popup.

This is only happening in IE6 (NS7, Opera7, etc. all fine)and it is also not happening to others on the development team with the same version of IE. I'm the front end guy and our back-end programmer can't recreate the problem.

I've checked my IE privacy settings and all that and it is the same no matter what settings are used.

The info above is not a lot to go on and I'm not even sure if I posted in the right forum since it looks like an IE bug, but any help at all would be very much appreciated _ I can't very well tell people to downgrade their browser when the site goes into production and 2 days looking around the net has not provided any real clues.

Thanks for any help....

jatar_k

2:17 am on May 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hey mikestibe,
Welcome to WebmasterWorld

can you give us a little more exact info on this

The popup auto-fills some database (mySQL) info into the parent window and about 80% of the time if I close the window and reopen it

are you killing the popup before it does it's job?
What exactly is the popup's job?
Are you saying you close the popup or the main window?

mikestibe

2:50 am on May 10, 2003 (gmt 0)

10+ Year Member



jatar_k

The popup has a select box in which the user can select
from a list of his 'clients' and it populates the form
with the client's contact details. The contact details
are first written to the popup and when a submit button
is pushed. It populates the form with that info and closes
the window.

I'm not sure that is relevant because I tried using a blank
template in the popup and I still had the problem with the lost sessions even with nothing in the popup.

The session loss happens 'randomly' when I close the popup and then reopen it. The system does not seem to care how the popup is closed or what is done with the popup - it still reandomly loses the session.

Again... all seems to work fine for everyone working on the site but me :( - the worry is a tech support nightmare if it turns out a lot of site users have the same IE install as me.

Here is what is being used to open the popup:

function newWindow(file,window) {
msgWindow=open(file,window,'resizable=no,width=300,height=520,screenX=200,screenY=100,top=130,left=100,modal=yes');
if (msgWindow.opener == null) msgWindow.opener = self;

Another note is that it either happens or does not happen. Meaning that sometimes when I log in all is fine and stays fine and other times it happens the first time I reopen the popup and logs me out. Very frustrating because I can't recreate it at will...

jatar_k

3:00 am on May 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



have you trie using session_start in the popup to see if that helps?

mikestibe

3:38 am on May 10, 2003 (gmt 0)

10+ Year Member



It's not there... this is the relevant part of the code (?):

// Checks if the session parameters are there...
if (!session_is_registered("sess_uid")) {
// Goes to the main page since for whatever reason
// the session parameters have been lost...
header("Location: index.php");
exit;
}

// Checks if the user can access the page...
$user = new user;
$user->user_id = $_SESSION['sess_uid'];
if (!$user->get_from_id($db)) {
// Goes to the main page since the user does not exist...
header("Location: index.php");
exit;
}

But why just me? I've heard of some issues with IE6 and sessions but.... :)