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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is asort php?

534


Explain some most commonly use string functions in php?

501


What are the functions used in php?

503


How to connect to a url in php?

514


Explain the differences between get and post methods?

492






How we load all classes that placed in different directory in one php file , means how to do auto load classes.

498


What is xss and csrf?

516


What is difference between explode() or split() in PHP?

492


How can we get ip address of a client in php?

535


What is a query in php?

471


What is trim function in php?

611


Tell me how can I display text with a php script?

514


How to open a file for writing?

560


Explain different sorting function in php?

600


Tell me what are the correct and the most two common way to start and finish a php block of code?

523