Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am using session_set_cookie_param

Status
Not open for further replies.

DaveShaw

Programmer
Jul 9, 2001
35
0
0
GB
I am using session_set_cookie_params (); to set the expiry date. But will there be a problem if the server time is say 13:00 and the clients PC time is 15:00. If it is set to expire 1hr after session_start(); what time will the session expire:
14:00 or 16:00???

PS Do I need to put
session_set_cookie_params ();
before
session_start? Thanx Dave Shaw!
 
Cookie time/date stamps are relative to UTC (what used to be called Greenwich Mean Time), so time zone differences don't matter. So long as the time zone and time are set correctly on both machines, it will be 1 hour.

You only have to use set_session_params() before using session_start() when you want the settings of the session you're about to start to be different than the settings in php.ini. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top