Session timeout

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
wnix
Forum Newbie
Posts: 4
Joined: Thu Nov 20, 2003 6:56 pm

Session timeout

Post by wnix »

Hi,

My site is hosted on other's server and I've just switched my site's usual session data dir to my own instead of the server's default:
session_save_path(mypath);

but now the session doesn't seem to timeout. I've tried:
define("MAX_IDLE_TIME", 10);
ini_set("session.gc_maxlifetime", 600);

but without success.

Can the session timeout only be controlled from the server (php.ini...)? If not, what are my options?

Thanks,
Nick.
ghost007
Forum Commoner
Posts: 49
Joined: Sat Nov 22, 2003 10:10 am

Post by ghost007 »

hi,

don't know really understand why the session time out didn't work but you can use mysql to manage your session time out.

Just ad a column with the creation time of the session and check this each time you access your session.

good luck
siech
Post Reply