[FX.php List] Extending Session Expiration
Gary Sprung
gary at gnurps.com
Tue Jan 23 17:05:33 MST 2007
Hi everyone,
I'm trying to increase the session expiration time for my solution
and I'm finding this is a complex issue without clear cut solutions.
The context is a Filemaker/PHP site with complex forms that rely on
about several session variables (ID of the organization, name of the
organization, name of person entering data, etc.). Many of the forms
take more time to fill than the 24 minutes that PHP defaults to
before it may end your session through garbage collection. I don't
have access to the server's php.ini file, as this is a shared hosting
service. How do I extend the session life?
I first tried session_set_cookie_params () with a time of 10800
seconds -- three hours.
That did not work. I guess it's not just about the length of time of
the session cookie.
On the php.net site, there are a number of discussions about this and
they do not all point the same way. About the best I've seen came in
comments general session handling posted last August. The commenter
mentions three commands:
ini_set("session.cache_expire","180");
ini_set("session.gc_maxlifetime","3600");
session_save_path("/my/own/path/without/url/sessions");
I guess all three must be be invoked before session_start(). Do I
make a new directory and save sessions there using the
session_save_path command? I have to invoke all three commands on
every page?
Thanks for any insights....
Gary Sprung
--------
Gary Sprung
GNURPS Consulting
gary at gnurps.com
www.gnurps.com
Landline: 720-565-9933
Cell: 303-859-9331
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070123/359805d9/attachment-0001.html
More information about the FX.php_List
mailing list