Jump to content

quick sessions question


Eggzorcist

Recommended Posts

I believe you can set certain php.ini values using .htaccess or your virtual host config (depending on hosting limitations).

You can also try doing the following in your code:

 

<?php
ini_set("session.gc_maxlifetime", 7200);
?>

 

Assuming their session times out, when they submit their post would you require them to log in again? If that's the case then i'm guessing you redirect them to a login page. What you need to do is create a new session for them using their old session cookie value, save their post data (in session), and process their login and then post in the same step.

My favorite subject, sessions.

 

On a shared web host where the common default location is used for the session save path, the shortest session.gc_maxlifetime setting of all the scripts running on the server wins.

 

To get a longer session.gc_maxlifetime setting to work, you must set the session save path setting to be to a private folder within your account's folder tree.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.