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 do you mean by core php?

0 Answers  


What does namespace mean in php?

0 Answers  


What is framework in php?

0 Answers  


If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? Can anyone explain how's the value of $$b=100

15 Answers   ABC, Asan, Indivar, Swistro Marketing Solutions,


How can I know that a variable is a number or not using a JavaScript?

2 Answers  


Tell me how is it possible to propagate a session id?

0 Answers  


How do I check if a given variable is empty?

0 Answers  


Write a query to find the 2nd highest salary of an employee from the employee table?

0 Answers  


How to access a specific character in a string using php?

0 Answers  


What is the use of friend function in php?

0 Answers  


What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?

7 Answers   HCL,


What are the advantages of stored procedures?

0 Answers  


Categories