session lifetime only 24 munites?

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
bungkusan
Forum Newbie
Posts: 20
Joined: Tue Sep 16, 2008 8:56 am

session lifetime only 24 munites?

Post by bungkusan »

Really urgent :banghead:

I just can't set the session lifetime.

this link doesn't help either
http://www.captain.at/howto-php-sessions.php

somebody help me :wink:
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: session lifetime only 24 munites?

Post by Stryks »

Can I just ask what you need longer sessions for?

From my understanding, that 24 minutes counts down from the last usage of the session. Setting it to longer sounds more like you want to remember logins, which is usually achieved via cookies, not by keeping sessions open.

What are you actually trying to achieve?
bungkusan
Forum Newbie
Posts: 20
Joined: Tue Sep 16, 2008 8:56 am

Re: session lifetime only 24 munites?

Post by bungkusan »

Stryks wrote:Can I just ask what you need longer sessions for?

From my understanding, that 24 minutes counts down from the last usage of the session. Setting it to longer sounds more like you want to remember logins, which is usually achieved via cookies, not by keeping sessions open.

What are you actually trying to achieve?
I use that for my shopping cart
maybe you can see it here :
http://www.bungkusan.com

wait until 20 munites, and please refresh your page and wait for the next 4 munites, the session will destroy itself, please, help me :?
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: session lifetime only 24 munites?

Post by Stryks »

Wow ... I don't know if it's just me, but that seems like really odd behavior.

I'm a database session convert for the most part, so I don't really have these issues. Take a look at the php manual for session_set_save_handler or have a search around here. You should be able to turn up some gems.

Hopefully if anyone else has any ideas that will work with standard sessions, they'll jump on in with other suggestions.

Cheers
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: session lifetime only 24 munites?

Post by jayshields »

Code: Select all

ini_set('session.gc_maxlifetime', 24 * 60);
?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Re: session lifetime only 24 munites?

Post by Maugrim_The_Reaper »

Maybe the application has a preset login expiry for security reasons? Does the application have a support contact or forum?
bungkusan
Forum Newbie
Posts: 20
Joined: Tue Sep 16, 2008 8:56 am

Re: session lifetime only 24 munites?

Post by bungkusan »

the hosting management suggest me to edit my own php.ini

how to do this stuff?
Post Reply