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.
PHP Sessions, IE, and Frames
Moderator: General Moderators
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.
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.
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.
Anyways, thanks a lot.