0

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 issue?

hakre
  • 193,403
  • 52
  • 435
  • 836

2 Answers2

1

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)

n00b
  • 5,642
  • 2
  • 30
  • 48
  • Thank you for your reply. Unfortunately this did not solve the problem? Any more ideas why this error might be caused. – user646540 Mar 06 '11 at 03:27
  • if both those things were set then its not possible (as far as i know...) are you sure you are setting the cookie or session_id ? – n00b Mar 06 '11 at 03:32
0

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.

Akarun
  • 3,220
  • 2
  • 24
  • 25