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 php constants and variables?

0 Answers  


What is the method to register a variable into a session?

0 Answers  


Write a query to to delete duplicate rows?

4 Answers   ATS,


What does $_server means?

0 Answers  


hello friend koi mujhe bata skta ke php easy way se aur jaldi kese seekh skte h...plz im waiting for ur answer..

2 Answers  






Is php still relevant 2019?

0 Answers  


Why is node js better than php?

0 Answers  


I created a new joomla module for administrator. when am going to install this, it is going "joomla/modules" path. but, i want to install this in the "joomla/administration/modules" path.

2 Answers  


Will php die?

0 Answers  


Are php session secure?

0 Answers  


What is the actually used php version?

0 Answers  


What version of php do I have windows?

0 Answers  


Categories