How to increase session life time using PHP?

Answer Posted / amit tiwari

The PHP global setting sessions.gc_maxlifetime is used by
default. You can increase session life time by adding a line
such as:

$SESS_LIFE=7200;

to set it to two hours.

Is This Answer Correct ?    7 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules in creating php variable?

744


What is xss in php?

768


Which are the best start and end tags to use?

777


What is difference Between PHP 5 and 7?

748


What is a trait in php?

761


Tell me what is the use of explode() function?

737


Explain what are some new features introduced in php7?

700


Where do I run php code?

713


How do you remove whitespace from the beginning and end of a $string variable?

702


Tell me what's the difference between include and require?

760


What is the difference between characters 23 and x23?

808


Do you know how to enable error reporting in php?

695


What is a model in php?

819


Does php support polymorphism?

716


How many types of session are there?

779