0

Possible Duplicate:
How do I expire a PHP session after 30 minutes?

Hi All,

The problem I am running into is that my host will not let me overwrite PHP.ini settings. They currently have the max lifetime of a session set to 24 minutes (ridiculous).

My idea is to destroy the session completely and then recreate it (ideally giving it a new lifetime -- right?).

How would I go about this?

NOTE: session_destroy only deletes the data, it does not destroy the actual session.

I have also tried (host doesn't allow overwriting settings)

ini_set("session.gc_maxlifetime", 86400);
Community
  • 1
  • 1
Ryan
  • 557
  • 3
  • 7
  • 19
  • What host are you using. If it's free why not choose another. – Ash Burlaczenko Aug 10 '10 at 14:35
  • You have the option of managing your own session data in the database, and assigning a cookie which you will have total control over to the user to match up to it. – Fosco Aug 10 '10 at 14:35
  • Hmm that's a decent idea Fosco. I'm trying to avoid using cookies though so the user can't change the data. Could the already change a session id? I'm just worried about the user changing the value and possibly hijacking someone else's session. The hosting is not free. It's through a hosting company and they won't allow me to overwrite their settings. – Ryan Aug 12 '10 at 19:53

0 Answers0