Old 23-04-2007, 10:40   #1 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
ini_set for session timeouts

I need to change session timeouts in PHP. A bit of Googling has suggested this method:

Code:
ini_set("session.gc_maxlifetime", TIME_IN_SECONDS_HERE);
Is this my best bet? Where should I put this line - I have a config file or maybe in my login script? You tell me!

Note: site is running on IIS, not Apache.
  Reply With Quote
Old 23-04-2007, 10:44   #2 (permalink)
freelancr
Senior Member
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 2,076
If it is a PHP config variable, then it should work. If it is an Apache config variable, then it won't. Just out of interest, why aren't you hosting it on a Linux/Apache server, much less hassle involved. I have never got all of PHP features to work correctly under windows, and many open source projects only test on linux.
  Reply With Quote
Old 23-04-2007, 12:50   #3 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Not my choice. Our IT guys are MS freaks.
  Reply With Quote
Old 23-04-2007, 15:41   #4 (permalink)
gk
geek
 
gk's Avatar
 
Join Date: Oct 2006
Location: *.everywhere
Posts: 204
Send a message via ICQ to gk Send a message via AIM to gk Send a message via MSN to gk Send a message via Yahoo to gk
I'd alter your php.ini file to change that. but if you can't thats likely your best be just place it as early in your script as possible.

Quote:
Note: If different scripts have different values of session.gc_maxlifetime but share the same place for storing the session data then the script with the minimum value will be cleaning the data. In this case, use this directive together with session.save_path.
  Reply With Quote
Old 31-05-2007, 06:49   #5 (permalink)
LazyMoon
Registered
 
LazyMoon's Avatar
 
Join Date: Sep 2006
Location: Adelaide, Australia
Posts: 12
EDIT: Woops, I just read you run IIS not Apache. Sorry, my solution wont work on IIS
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8