• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

Session problems on busy server

Hello

On our server, we allow users only a certain amount of time to complete a transaction.

The time is tracked in a session.

When the server has a heavier load than usual, the sessions expire early!
What is causing this ?

Thanks.
0
bionicblakey
Asked:
bionicblakey
  • 2
  • 2
  • 2
1 Solution
 
BogoJokerCommented:
Have you thought about making the counter javascript, therefore its clientside and not wasting server processing for something simple like a 2 minute counter.

Joe P
0
 
bionicblakeyAuthor Commented:
hmm.

Would it then need to pass info to the PHP app?

Also, what if the client has javascript turned off?
0
 
BogoJokerCommented:
Good point, with javascript turned off that would be a problem.
If it was turned on, when time runs out the page could be redirected.

Joe P
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Brian BushSolutions ArchitectCommented:
You could use META REFRESH. It does not rely on Javascript and runs in the browser client.

<meta http-equiv="refresh" content="120;url=http://www.company.com/youexpired.html">

The 120 is number of seconds before redirect.

You don't need to send anything to the PHP page unless you want to have end
logic of some variety. Not sure why you would need that.

--brian
0
 
bionicblakeyAuthor Commented:
well..
i don't think that will work  either...
the process takes  the user over many different pages

in terms of PHP sessions, is there a way to lock them to make sure they remain in tact?
0
 
Brian BushSolutions ArchitectCommented:
as long as you put a session_start(); at the top of each
page, the session varibles will follow them.

Also, you can set the meta tag with a variable in it for the url so
that it can change.

--brian
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now