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 are the differences between require and include?

0 Answers  


How to add different images in php program like a job site.......

2 Answers  


Does php have block scope?

0 Answers  


How long do php sessions last?

0 Answers  


How can php and javascript interact?

0 Answers  


What is x+ mode in fopen() used for?

0 Answers  


List some string function name in php?

0 Answers  


How can we determine whether a php variable is an instantiated object of a certain class?

0 Answers  


What is the importance of php?

0 Answers  


What is the value for this auto incremented field user_pri_id?

0 Answers  


when will be syndicate bank written exam ? i need the date of exam

0 Answers  


If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?

0 Answers  


Categories