Date: 01/30/01
- Next message: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Previous message: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- In reply to: A.C.N.S. Information and News: "[phplib] PHPLib and frames examples?"
- Next in thread: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Reply: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, it's a complete bitch because AKAIK each frame will submit the same
session cookie, there is no general way to identify which frame has submitted
which submission, there is no guaranteed *order* in which
a browser will make the multiple submissions involved when it loads the frames
in a frameset, and (the real killer) the submissions can run concurrently.
Careful analysis and coding can get you over the first three hurdles, the real
killer that I encountered was dealing with the concurency problem. I solved
this by overriding get_lock() and release_lock() in session.inc (in an old
version of phplib, nowadays in ct_sql.inc and friends):
// Overriding these two functions renders $database_lock_semaphore
// redundant.
function get_lock() {
$lockstr = 'WDBA/'.config_info('database').'/'.$this->id;
while (!mysql_result($this->db->query("select get_lock('$lockstr',5)"),0,0))
;
}
function release_lock() {
$lockstr = 'WDBA/'.config_info('database').'/'.$this->id;
$this->db->query("select release_lock('$lockstr')");
}
The problem with the default implementation of these functions is that there was
no easy way to get the sessionid into $database_lock_semaphore. At least, that
was true when they were in session.inc. Maybe it's possible now that they have
been moved into ct_sql.inc?
The key is that you must lock the db with the sessionid so that multiple
concurrent hits from a frameset cannot interfere with each other.
YMMV!
On Tue, 30 Jan 2001, you wrote:
>
> Is there anyone out there that has some examples of using phplib with frames? If so could you please send 'em my way. I'm having unbelievable problems with getting phplib to work correctly with frames. Thanks.
>
> Chuck
>
--*************************************************** John Sutton SCL Computer Services URL http://www.scl.co.uk/ Tel. +44 (0) 1239 621021 ***************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Previous message: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- In reply to: A.C.N.S. Information and News: "[phplib] PHPLib and frames examples?"
- Next in thread: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Reply: A.C.N.S. Information and News: "Re: [phplib] PHPLib and frames examples?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

