how set session expire time in php?

Answers were Sorted based on User's Feedback



how set session expire time in php?..

Answer / bharanikumar

go to php.ini , set the time limit for the session

Is This Answer Correct ?    9 Yes 5 No

how set session expire time in php?..

Answer / prakash.matte

Question is not for ini file and not for unsetting, it is
for changing the session life time from php file.

ini_set("session.gc_maxlifetime", number_of_seconds);

We can override the php.ini settings (if we don't have
access) from php file using ini_set()

Is This Answer Correct ?    2 Yes 0 No

how set session expire time in php?..

Answer / naiju

unset("username" "timeout",60)

Is This Answer Correct ?    2 Yes 1 No

how set session expire time in php?..

Answer / bharanikumar

u feel u dont have access php.ini , then go with .http ,

make changes



Post your question here also ,

www.happylife.in

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More PHP Interview Questions

Is nan in php?

0 Answers  


What is static variable in php?

0 Answers  


Explain the difference between $var and $$var?

0 Answers  


How to get length of an array in PHP?

0 Answers  


Is php required for wordpress?

0 Answers  






What type of headers that PHP supports?

0 Answers  


What is the purpose of the following files having extensions 1) .frm 2) .myd 3) .myi? What do these files contain?

2 Answers  


How is it possible to know the number of rows returned in result set?

0 Answers  


How can I display text with a php script?

0 Answers  


What are the special characters you need to escape in single-quoted stings?

0 Answers  


Which php framework is fastest?

0 Answers  


How long will it take to learn php?

0 Answers  


Categories