Jump to content


Photo

PHP, ASP, Frames and Sessions


  • Please log in to reply
3 replies to this topic

#1 ratchet

ratchet
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 26 September 2006 - 01:29 PM

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!


#2 steveclondon

steveclondon
  • Members
  • PipPipPip
  • Advanced Member
  • 161 posts

Posted 26 September 2006 - 01:46 PM

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.

#3 ratchet

ratchet
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 26 September 2006 - 01:51 PM

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?

#4 steveclondon

steveclondon
  • Members
  • PipPipPip
  • Advanced Member
  • 161 posts

Posted 26 September 2006 - 01:54 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users