I want to extend the timeout of a php session. Currently, on the web server, php.ini has session.gc_maxlifetime set to 1440 (20 minutes)
I found this code on the web:
// server should keep session data for AT LEAST 1 hour
// each client should remember their session id for EXACTLY 1 hour
session_start(); // ready to go!
If I want to extend the session duration to one hour (or whatever I want), can I use this code just once (where an authorized user logs in) or do I have to put it on EVERY php page that accesses session variables?