Re: Extending session timeouts manually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris wrote:
Ryan Fielding wrote:
Ryan Fielding wrote:
Chris wrote:
Ryan Fielding wrote:
I'm using a session to save cart contents within a store, and this session follows the user as they proceed through the checkout. My problem is, if a customer orders say 10 items, they have the option to input 10 different addresses that these items will be delivered to. I've noticed that some sessions are timing out before the user can finish entering in all the details. I thought that maybe a tiny iframe calling a page that used <Meta Http-equiv="Refresh" Content="300"> to refresh the iframe every 5 minutes, but no such luck.

Does anyone know of any thing else i can try to stop this from happening?


What's the session expiry time set to? Try setting it manually?

See http://www.php.net/manual/en/function.session-cache-expire.php

It's currently set to the default 180 minutes.

What about other session settings? Check a phpinfo page and see what your other settings are.

In regards to this, i would like to keep it at 180 minutes, but only extend it for certain instances where the customer is taking a long time to enter the details.

How are you going to know that? Have a checkbox on the page - 'are you going to take a long time to fill in this form?' ;) (Yeh bad joke :P).

Session config is as follows:


   session

Session Support 	enabled
Registered save handlers 	files user


Directive 	Local Value 	Master Value
session.auto_start 	Off 	Off
session.bug_compat_42 	Off 	Off
session.bug_compat_warn 	On 	On
session.cache_expire 	180 	180
session.cache_limiter 	nocache 	nocache
session.cookie_domain 	/no value/ 	/no value/
session.cookie_lifetime 	2592000 	2592000
session.cookie_path 	/ 	/
session.cookie_secure 	Off 	Off
session.entropy_file 	/no value/ 	/no value/
session.entropy_length 	0 	0
session.gc_divisor 	1000 	1000
session.gc_maxlifetime 	14400 	1440
session.gc_probability 	1 	1
session.name 	PHPSESSID 	PHPSESSID
session.referer_check 	/no value/ 	/no value/
session.save_handler 	files 	files
session.save_path 	/tmp 	/tmp
session.serialize_handler 	php 	php
session.use_cookies 	On 	On
session.use_only_cookies 	Off 	Off
session.use_trans_sid 	Off 	Off


i can't see anything in there that would be causing this sort of behaivour. I've also just tested it again and it seems the session is actually losing the majority of its contents before the 180 minute mark, which could explain why it seems to time out.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux