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

What is php array function?

0 Answers  


What is the difference between php and core php?

0 Answers  


Whether it is possible to share a single instance of a memcache between multiple php projects?

0 Answers  


What does isset() function?

0 Answers  


How can we encrpt a text?

3 Answers  






What is the difference between get & post ?

0 Answers  


suppose if u want to pass session value using cookies onlu.. what changes i've to made in php.ini file?

1 Answers  


What are the 5 types of variables?

0 Answers  


How to parse configuration file in php?

0 Answers  


What is the difference between get and post method in php?

0 Answers  


Explain whether it is possible to share a single instance of a memcache between multiple php projects?

0 Answers  


How big is varchar max?

0 Answers  


Categories