I have a suggestion that would allow you to take charge of what is going on
with your sessions.  Install your own session handler routines, storing your
own session data in your own database table.  These functions would need to
be loaded on each page before you execute the session_start() function on
each page.

http://www.php.net/manual/en/function.session-set-save-handler.php

Since the Garbage Cleanup and session read function is now under your
control, you can establish the session expiration that is appropriate for
your application, independent from the PHP default for the site.  Be
careful, however for the parameters that control the life of the cookie in
the browser, they can also cause the session to be lost if not set properly.

http://www.php.net/manual/en/function.session-set-cookie-params.php

This may sometimes seem intermittent, since the cookie will expire from the
time first established in the browser, and if you are only aware of the time
from the last page, and the cookie goes away, the session will appear to
have been destroyed.

good luck,

Warren Vail
[EMAIL PROTECTED]


-----Original Message-----
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 11:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: PHP Sessions Question


> On garbage collection, it happens sometimes within seconds and sometimes
> within minutes.  It tends to occur in batches with lulls of 20 to 30
> minutes.  So, for example, I can login, navigate through 11 different
pages
> to generate the problem, navigate 2 pages to generate the problem, and
then
> not see the problem again for another 5 minutes.  Does that fall in line
> with what you're thinking?
>

Actually, no.  Garbage collection would destroy the sessions, so if
they're only "temporarily" disappearing then load balancing seems even
more likely.

I'm going to assume not, but are you using a non-default session
handler?  If for instance you were storing sessions in another database,
or simply on a different machine then connections can fail.  This would
most likely only be set up through the set_session_handler directive I
mentioned before... but you should also check your php.ini values for
session.save_handler and session.save_path

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to