Jump to content

quick sessions question


Eggzorcist

Recommended Posts

I'm developing an application which may have have a person on the same page writting something for quite a long period of time. I was wondering as my security is set up with sessions could these sessions die by the time you'd finish the form?

 

Thanks

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.