Sessions are expiring too soon in my PHP login, running on a shared server. The server default is 24 minutes, but at times sessions are expiring before that.
I say "at times" because the expiry time seems to vary with the time of day (?)
I get the impression that this may be due to other sessions "interfering" with mine on the shared server, and that I can overcome this by specifying a new path for session storage on every page.
Is this right, and if so, how do I do this?
Can I set this up using an htacess file?
Can I write the:
$session_timeout and the session.gc_maxlifetime there as well? If so, how?
I saw an ominous note somewhere, related to this, saying, "...But the .htaccess from your original site might also include directives which cause JPI failure...." What's that about?
Should the new directory be outside the public access www level? Does that enhance security?
Also, I saw a comment that, "If you are using the subdirectory option for storing session files then garbage collection does not happen automatically. *You will need to do your own garbage collection through a shell script, cron entry, or some other method." I'm not quite sure what the "subdirectory option" is, but is this necessary, and if so, what would be the cron job code for this?
I'd be hugely grateful for some expertise here.