What is the default session time in PHP and how can I
change it?
Answer Posted / 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 View All Answers
What will the ?getdate() function returns in PHP?
How to increase the execution time of a PHP script?
What would occur if a fatal error was thrown in your php program?
What is http php?
Does php need html?
Explain how you can update memcached when you make changes to php?
How can we execute a php script using command line?
What are major variables in research?
What type of errors can be occurred in php?
How can we connect to a mysql database from a php script?
Why do you need to filter out empty files?
Is php 7 backwards compatible?
Explain soundex() and metaphone().
Explain what is the difference between session and cookie?
What does $globals mean?