Hi guyz, hope you can help me on this matter..
Let say i got a php file that will run huge codes with long processes, and it requires more than 30 minutes to finished it.
My codes are divided to 2 parts, where first part require 25 minutes, and second part require 5 minutes. Each of them requires "admin" session to pass the if statement.
Here's the sketch of my codes:
<?
if(isset($_SESSION['admin'])){
//this part require 25 minutes
}
if(isset($_SESSION['admin'])){
//this part require 5 minutes
}
?>
so while processing my first part of code, will my session destroyed due to inactivity for 20 minutes? will my second part of code runs?
if my session will be destroyed, is there any solution to this?
(except putting 2nd part of code into first part)
question on session
Moderator: General Moderators
- arrielmabale
- Forum Newbie
- Posts: 15
- Joined: Fri Aug 13, 2010 3:57 pm
- Location: Dubai
Re: question on session
set this
set_time_limit(0);
then set session to 0 to make it unlimited lifespan
session_set_cookie_params('0');
set_time_limit(0);
then set session to 0 to make it unlimited lifespan
session_set_cookie_params('0');
-
shawngoldw
- Forum Contributor
- Posts: 212
- Joined: Mon Apr 05, 2010 3:38 pm
Re: question on session
I'm just curious, what are you doing that takes half an hour to run?