Re: [PHPLIB] frames + auth = ? From: Kristian Köhntopp (kris <email protected>)
Date: 12/22/99

Allen Lee wrote:
> Does anyone know if it is ok to use frames while you are using session
> management features?

There are several special techniques to be employed when using
frames, but PHPLIB basically works with frames.

When loading a frameset, you have one driving document, containing
the frameset definition and several dependent documents containing
the actual frame contents.

If you are going to use GET mode as a primary mode or as a fallback
mode, you need to propagate the session id through the driving document,
that is, you need to have a page_open() before the frameset definition
and you need to rig the <frame> tags with $sess->purl(). If your
driving page does not write session variables, you do not have to
use page_close() on that page.

If you are using PHPLIB on multiple dependent documents, there usually
is only one content frame and the remaining frames are navigational
frames. Usually only the content frame is writing session variables,
whereas the navigational frames are only reading them. You avoid
locking issues and race conditions by not using page_close() in
the navigational frames, but only in the content frame.

If you are using authentication, you should do so only in the
driving document, replacing the entire frameset with a login page
(recommended) or you should do so only in the content frame, but
not in the navigational frames (doable and supported). Do not
forget that Authentication always writes session variables, as the
expiration counter of the $auth object needs to be updated. There
must be at least on page_close() per page view to write this
updated information.

Kristian

-- 
Kristian Koehntopp, Knooper Weg 46, 24103 Kiel, +49 171 2231 811
Linux - Come to where the sourcecode is.
Where software still is free and some men code what what others only
dream of.

- PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.