RE: [Phplib-users] Session/Auth Problem
Brought to you by:
nhruby,
richardarcher
From: Rob H. <rob...@ws...> - 2002-10-09 21:28:03
|
The iframe is a requirement of the site design as the top side menu areas must be available no matter where on the page the person is browsing. Secondly, I understand the danger of having session variables overwrite each other, and in fact the outer frame will never need to make changes, just understand the session context, which it is currently not doing at the php-lib level although I have no problems calling the php session functions directly as once I am authenticated I get the correct SID and variables. In fact, IFRAMES were created in response to the desire to be able to place scrolling content that is changeable inside another document without having to refresh the whole document, which is what I am trying to do with it. The "correct method" depends completely on the design requirements and not an arbitrary opinion. Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Michael > Chaney > Sent: Wednesday, October 09, 2002 5:15 PM > To: php...@li... > Subject: Re: [Phplib-users] Session/Auth Problem > > > On Wed, Oct 09, 2002 at 08:56:55AM -0400, Rob Hutton wrote: > > I have auth occurring inside a iframe on my page. That works > correctly and > > that iframe has access to the $sess and $auth variables. The > outer frame > > however does not. Once I refresh it, the > $GLOBALS['Site_Custom_Session'] > > variable gives me the same session ID, but $auth and $sess are > not defined > > in the outer frame. Yes, the outer frame does a page_open (in fact, I > > copied and pasted it from the inner frame just to make sure. > > > > Any Ideas? > > Yes. Don't use frames. > > The purpose of the iframe is to allow you to include a bit of HTML from > another site over which you have no control into your current page. > More specifically, they were created to allow fancier banner ads to be > created, html instead of gif's. > > What you're doing will always cause problems. Please don't fool > yourself into thinking that it's possible to do. The inner and outer > frame may well load somewhat simultaneously, meaning that two different > pages may open your session variables, and subsequently save them back > out. It's quite possible in that case that changes to session variables > may be lost. The result will be flakey behavior, such as you've > described. > > The correct method is to simply include the code instead of using an > iframe. > > Michael > -- > Michael Darrin Chaney > mdc...@mi... > http://www.michaelchaney.com/ > > > > |