Rajesh Joshi
asked on
Session time out quickly.
I have used code like this
But within a few seconds the session expires, so it redirect to login page. I need 10 Min to expire the session.
I have also created php.ini in kept in root directory which says
<?php
session_start();
if (($_SESSION['isLogged'] == "true")&& ($_SESSION['roll'] == 1)) {
} else {
header("location:login.php");
die();
}
?>
But within a few seconds the session expires, so it redirect to login page. I need 10 Min to expire the session.
I have also created php.ini in kept in root directory which says
ini_set('session.gc_maxlifetime', 600);
session_set_cookie_params(600);
session_start(); // ready to go!
Something else is going on, it doesn't work that way. Also your 'php.ini' code is not in the correct format for 'php.ini' which contains statements but not PHP functions.
ASKER
Hi Dave Baldwin,
Thank you for your reply. Please guide me in details for the solution.
Thank you for your reply. Please guide me in details for the solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Dave Baldwin & Ray Paseur.
Can you please guide me, session variables expires very soon.
With regards,
Rajesh Joshi.
Can you please guide me, session variables expires very soon.
With regards,
Rajesh Joshi.
Please consider hiring a professional developer. Maybe use E-E Gigs. You can waste years of your life trying to learn all the things a professional already knows, or you can get a professional on your team right now!
ASKER
Hi Ray Paseur,
Thank you for such unexpected answer.
I know php / mysql scriting very well, the only problem is with session time out problem.
With regards,
Rajesh.
Thank you for such unexpected answer.
I know php / mysql scriting very well, the only problem is with session time out problem.
With regards,
Rajesh.