开发者

php session variables expire after 30 mins

I have a php application running on LAMP. All the form information needs to be stored in Database. When the user does not submit the form more than 30 min, tries to submit later the php session variables get expired.

How can I solve this i开发者_Go百科ssue?


set the session expiry longer (session garbage collector) in php.ini

and set the cookie lifetime longer (if you use cookies to store session id)


Perhaps, you can use a hack; like using a Ajax post to maintain the session opened !?

I already used this technic to show to tue user a reminder or a question "Are you idle ?". In the background the Ajax post call a PHP script with "session_start()" that maintain the session.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜