session expire time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

session expire time

Post by shiznatix »

i need to set the sessions expire time to 2 hours. well i looked into it and it seamed a simple ini_set would do the trick, well i decided instead of waiting 2 hours to see if it worked i would just set it to 10 seconds and see if it worked by doing

Code: Select all

ini_set ("session.gc_maxlifetime","10");
well that did not work. any sugestions how to keep my session alive for 2 hours?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Hey Shiznatix -- Found that just a few days ago...

session_set_cookie_params()
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

many thanks
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

neophyte wrote:Hey Shiznatix -- Found that just a few days ago...

session_set_cookie_params()
Wow. Odd! I had never seen that function before, and I actually needed that.

Many thanks from me too!
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

No biggie. I think I actually picked it up here on another thread.
Post Reply