|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 3
|
|
| Author |
|
|
Advanced Member Joined: Aug 23, 2005 Post Count: 101 Status: Offline |
Dear All, Im have setup a simple login script with sessions. After about 3 min the session becomes invalid and i have to login again. Is there any way i can increase the session time out without editing my php.ini (no access to php.ini) ???? Kind regards, Zero |
||
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2940 Status: Offline |
To get the default (file-based-sessions) session timeout value on the server, you can view it through the ini_get command: // Get the current Session Timeout Value $currentTimeoutInSecs = ini_get(?session.gc_maxlifetime?); Change the Session Timeout Value // Change the session timeout value to 1 hr ini_set(?session.gc_maxlifetime?, 60*60); ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates |
||
|
|
Advanced Member Joined: Aug 23, 2005 Post Count: 101 Status: Offline |
Dear Stefan, Thanks for your quick response, For some reason this code isnt working for me. // Get the current Session Timeout Value $currentTimeoutInSecs = ini_get("session.gc_maxlifetime"); When i echo $currentTimeoutInSecs i get the cureent session time. But when i place // Change the session timeout value to 1 hr ini_set("session.gc_maxlifetime", 60*60); before or after the session starts the $currentTimeoutInSecs dousnt change. Kind regards, Zero |
||
|
|
|
|
|
Current timezone is GMT May 25, 2013 5:26:44 PM |