Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the default session time in PHP and how can I
change it?

Answers were Sorted based on User's Feedback



What is the default session time in PHP and how can I change it?..

Answer / diwakar tiwari

default session time in PHP is 1440 seconds. if we want to
change the session time in php, then we have to change in
php.ini.

Is This Answer Correct ?    134 Yes 26 No

What is the default session time in PHP and how can I change it?..

Answer / tarangini

default session time 1440.

we can change it by
$garbaze="14400";
ini_set(session_gc_maxlifetime,$garbaze);

Is This Answer Correct ?    81 Yes 30 No

What is the default session time in PHP and how can I change it?..

Answer / amit beniwal

Default session in php is 1440 second. we can change it through
$sessLimit="14400";
ini_set(session.gc_maxlifetime,$sessLimit);

Is This Answer Correct ?    43 Yes 21 No

What is the default session time in PHP and how can I change it?..

Answer / sunny patel

Default session time is 1440 seconds,but we can change it
through ini_set() method.

$intTime=152;
ini_set("session.gc_maxlifetime",$intTime);

Is This Answer Correct ?    40 Yes 18 No

What is the default session time in PHP and how can I change it?..

Answer / kuldeep verma

it is true that by default time of session 1440 sec. and we
can change in php.ini....
it is also depend on brower. when closing the brower then
session lost. session data will be deleted after session
timeout.if connection lost. And recreate the connection then
it session continue.......

Is This Answer Correct ?    28 Yes 20 No

What is the default session time in PHP and how can I change it?..

Answer / ashutosh kumar

how can make a login in such way that if user enter 3 times
incorrect user & password then login should disappeared for
24 hrs at that system in php?

Is This Answer Correct ?    21 Yes 16 No

What is the default session time in PHP and how can I change it?..

Answer / praveen

1440

Is This Answer Correct ?    7 Yes 2 No

What is the default session time in PHP and how can I change it?..

Answer / archana

1440. can change it as specified above. bt i have a doubt,
should we need to change 'session.cookie_lifetime' to the
value same as the 'session.gc_maxlifetime' value??

Is This Answer Correct ?    5 Yes 1 No

What is the default session time in PHP and how can I change it?..

Answer / ketan kamdar

default session time in PHP is 1440 seconds, and we can
change using following way.

1) we can change in php.ini
2) ini_set(session_gc_maxlifetime, 1200);
3) using .htaccess:
php_value session.gc_maxlifetime 1200

Is This Answer Correct ?    3 Yes 1 No

What is the default session time in PHP and how can I change it?..

Answer / archana

ini_set('session.gc_maxlifetime', 14400);
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);

add above codes in index.php. it will work.

changing php.ini value is not a good way.it will not work.

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More PHP Interview Questions

Describe the importance of DABA BASE ABSTRACTION LAYERS in PHP and database connection?

1 Answers  


How to use http headers inside php?

0 Answers  


How to increase session life time using PHP?

8 Answers  


How to pass an argument to a function?

0 Answers  


What is php session start?

0 Answers  


Tell me how can we get the error when there is a problem to upload a file?

0 Answers  


Do you know what is use of count() function in php?

0 Answers  


What are php keywords?

0 Answers  


Which are the best start and end tags to use?

0 Answers  


coding for deleting items form data base on select

1 Answers  


What is the difference between nowdoc and heredoc?

0 Answers  


What is htmlspecialchars?

0 Answers  


Categories