Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-18-2011, 02:35 PM   PM User | #1
john_w3
New Coder

 
Join Date: Jan 2010
Location: Cardiff, UK
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
john_w3 is an unknown quantity at this point
session timeout with php_value session.gc_maxlifetime

After my users log in, the $_SESSION["logged_in"] expires after inactivity of the default 24 mins (1440 secs) and logs them out.

I want to extend this to 2 hours (7200 secs), but adding the below into my .htaccess is not doing it.

Code:
php_value session.gc_maxlifetime 7200
How can I extend the session timeout to 7200 with confidence that it is kicking in?
I want to be able to do it in the .htaccess as I do not want to change it server wide in my php.ini

Thanks in advance.
john_w3 is offline   Reply With Quote
Old 11-18-2011, 05:21 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,493
Thanks: 44
Thanked 438 Times in 427 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
I once heard that you can have individual php.ini files in seperate directories. You might want to consider that option.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Reply

Bookmarks

Tags
.htaccess, gc_maxlifetime, htaccess, php_value, timeout

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:50 AM.


Advertisement
Log in to turn off these ads.