trying to understand how i would go about setting a 5 minute session lifetime
I gather you can set the max time between garabge collection by using:
ini_set('session.gc_maxlifetime', 300);
But, I understand on a shared hosting environment, changing just the session.gc_maxlifetime may not be effective because if there are other websites with a lower value (or using the default value) they will end up clearing the session data.
So what you can do is set up you own save path using
session_save_path($path);
Now, on x10 pemium, would I have to set up a custom path for EVERY user that logs in to my site?
And what page would I put this code on
ini_set('session.gc_maxlifetime', 300);
session_save_path($path);
session_start();
would I have to put it one every page, or will just putting it on the first page the user is likely to come across work, like login.php for example?
I've also read that you can set this up in your .htaccess file:
php_value session.gc_maxlifetime 300
php_value session.save_path "/PATH/TO/SESSIONS"
Is this the preferred way to do thinngs?
I gather you can set the max time between garabge collection by using:
ini_set('session.gc_maxlifetime', 300);
But, I understand on a shared hosting environment, changing just the session.gc_maxlifetime may not be effective because if there are other websites with a lower value (or using the default value) they will end up clearing the session data.
So what you can do is set up you own save path using
session_save_path($path);
Now, on x10 pemium, would I have to set up a custom path for EVERY user that logs in to my site?
And what page would I put this code on
ini_set('session.gc_maxlifetime', 300);
session_save_path($path);
session_start();
would I have to put it one every page, or will just putting it on the first page the user is likely to come across work, like login.php for example?
I've also read that you can set this up in your .htaccess file:
php_value session.gc_maxlifetime 300
php_value session.save_path "/PATH/TO/SESSIONS"
Is this the preferred way to do thinngs?