top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are default session time and path in PHP?

+1 vote
2,938 views
What are default session time and path in PHP?
posted May 15, 2014 by Karamjeet Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

3 Answers

0 votes

Default session time in PHP is 1440 seconds(24 minutes) and Default session path is temporary folder/tmp .

answer May 16, 2014 by Mohit Sharma
0 votes

Default session time in PHP is 1440 seconds or 24 minutes
Default session save path id temporary folder /tmp

answer May 16, 2014 by Vrije Mani Upadhyay
0 votes

1440 sec is default session time

answer Sep 5, 2015 by anonymous
Similar Questions
+2 votes

I always hate dealing with date/time stuff in php - never get it even close until an hour or two goes by....

anyway I have this:

// get two timestamp values
$exp_time = $_COOKIE[$applid."expire"];
$curr_time = time();
// get the difference
$diff = $exp_time - $curr_time;
// produce a display time of the diff
$time_left = date("h:i:s",$diff);

Currently the results are:

exp_time is 06:55:07
curr_time is 06:12:03
the diff is 2584
All of these are correct.

BUT time_left is 07:43:04 when it should be only "00:43:04". So - where is the hour value of '07' coming from?? And how do I get this right?

...