Page 1 of 1

PHP Sessions, IE, and Frames

Posted: Sun Feb 05, 2006 8:23 pm
by Iganorf
I've recently created a php page that uses sessions to authenticate users. This page is held on a site that we'll call site1. I'm viewing the page inside a frame on site2 (I do this because I don't want the average user to see that the page they are viewing is actually coming from a different site).
In both IE and FF the page works fine while viewing it on site1. In FF the page works fine inside the frame in site2, but not in IE.
What gives? I know it's a cookie problem that IE doesn't want to accept cookies from the page inside the frame, but why and how can I get around this? Thanks in advance.

Posted: Mon Feb 06, 2006 4:37 am
by phpScott
server side session's
Or use a database to handle the sessions.
If both sites are yours then you will probably have access to the database from both sites.


Lots of tutorials around to do this.
:lol:

Posted: Mon Feb 06, 2006 5:53 am
by Jenk
Is 'site2' your site, and more importantly, your content? From a moral point of view, and maybe even a legal (copywrite) POV in some places, this use of frames is a no-no if it is not.

Anyway, regardless of whos content it is, in order for the sessions to work on both sites, both sites must be on the same server, or more specifically have access to the same sessions cache.

Posted: Mon Feb 06, 2006 8:39 am
by Iganorf
Yes, both sites are mine, and at first I also thought that sessions wouldn't work because they aren't the same site, but it works fine in FF, and with more testing I found that with IE set to Allow All Cookies it works fine. I'll look into server-side session handling, but I would really like to get this worked out.
Anyways, thanks a lot.

Posted: Mon Feb 06, 2006 9:39 am
by feyd