Jump to content

Archived

This topic is now archived and is closed to further replies.

ratchet

PHP, ASP, Frames and Sessions

Recommended Posts

Hi,
This gets ugly... I inherited a php site from another programmer and I'm not that great at php so that's challenge #1. Next, there is another ASP site that loads this php site in a frame (I have no control over that). The problem is when you visit the php site in the asp site's frame, there is a session variable that's not being set properly and it's causing problems on the php site. There are a couple of navigational links on the php site that should not show up if the php site is loaded using a specific url, namely the one used by the asp site to load the php site into the frame. Here are the url's:

ASP site that loads the php into a frame: www.proforma.com/gapeach
near the bottom left corner is a link - 'Gourmet Food Gifts' under the Happy Holiday's section. If you visit this link, the 2 bottom navigational links on the php site (which is now included in a frame) should not show up - 'Find a Distributor' and 'Distributors Only'. If you visit the same url that is included in the frame of the asp site(DON'T CLICK YET www.mapleridge.com/catalog/link.asp), it works fine. So, I think it's the frame that's causing the problem. It get worse here...I added some framebuster javascript which worked as desired. Upon visiting the link in the frame using Firefox, it appeared to work fine. If I used IE, it didn't work. I have since removed the frambuster code.

The second url is the url that works if you simply use it to visit the php site with the url that's supposed to get loaded into the frame. The links do not get displayed and this is the desired result. Warning: once the session var is set by visiting this url, it works fine thru the ASP frame site too so it's misleading.......
www.mapleridge.com/catalog/link.asp
I know that's linking to an asp file but the .htaccess file redirects to a php file that redirects to the appropriate url with '?rtr=client' as a url variable and that's what actually tells the code to set the session variables.

If anyone has any ideas on how to not make the links display on the first visit in the frame asp site, I would really appreciate your help!! Thanks in advance!

Share this post


Link to post
Share on other sites
my god, this doesn't sound good. This must be on a windows server. Some $_SERVER varibles don't work so if you are setting any url links based on these have a look.

Share this post


Link to post
Share on other sites
Interesting! I have no control over the asp site that includes the php site in the frame. I'll see if I can find out if it's on a windows server or not. thanks for the info. If it is on a windows server, does anyone have any ideas to get around the problem?

Share this post


Link to post
Share on other sites
If the main program is asp it would be a windows server. Look into any code that will use $_SERVER varibles. Some work some don't.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.