Sessions, IE, Frames

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jwarreniii
Forum Newbie
Posts: 4
Joined: Fri Nov 27, 2009 2:31 pm

Sessions, IE, Frames

Post by jwarreniii »

Hello, everyone-

I have a page that is called in an iframe and ie is behaving (what I consider) strangely. Here’s what is happening:

Code: Select all

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
print_r($_SESSION);
After loading the page in IE, the first time I refresh the page the session_id changes. After the first time, it stays no matter how many times I refresh the page. In Firefox and Chrome, the session_id doesn’t ever change (as expected).

The header line is there so IE can set a session in a frame. With out it, the session_id changes on every refresh (not just the first one).

Also, the iframe and the parent are on different domains. If they are on the same domain, everything is fine.

If anyone can help, I would really appreciate it.

Thanks in advance.
jwarreniii
Forum Newbie
Posts: 4
Joined: Fri Nov 27, 2009 2:31 pm

Re: Sessions, IE, Frames

Post by jwarreniii »

I just realized that only ie8 has this issue. Ie6 and 7 behave exactly like Firefox and Chrome.

This is driving be insane. If anyone has any ideas. I'd love to hear them.
Last edited by jwarreniii on Sat Nov 28, 2009 9:46 am, edited 1 time in total.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Sessions, IE, Frames

Post by daedalus__ »

whats this for exactly?
jwarreniii
Forum Newbie
Posts: 4
Joined: Fri Nov 27, 2009 2:31 pm

Re: Sessions, IE, Frames

Post by jwarreniii »

It's for an integration between our database and our customers' websites. Basically the iframe contains a customizable form where they can have users submit a query to our system and we return post data.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Sessions, IE, Frames

Post by daedalus__ »

this is a kind of silly idea. but you could force a refresh as soon as an ie8 user loads the page? hopefully they wouldnt notice.
jwarreniii
Forum Newbie
Posts: 4
Joined: Fri Nov 27, 2009 2:31 pm

Re: Sessions, IE, Frames

Post by jwarreniii »

I thought of that, but then the referrer changes and that is what I need to find out the parent URL. Actually, that is was I am trying to store in the session var.

Does anyone have any idea what I can do to remedy this?
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Sessions, IE, Frames

Post by daedalus__ »

maybe you could store the referrer in the query string of the redirect or in a cookie?
Post Reply