SESSION Time Out Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeffrydell
Forum Commoner
Posts: 77
Joined: Thu Jan 17, 2008 4:39 pm
Location: Menasha, WI

SESSION Time Out Error

Post by jeffrydell »

I have a multi-form application which uses sessions to store data until the user reaches "the end" (this is the current LIVE version of my app, not the OOP version which is in development) ... I'm starting to encounter folks who like to start the process, go visit their neighbor for a glass of iced tea, then come back and try to finish up their registration.

Needless to say, their session 'times out' and they end up seeing a bunch of var not found errors.

What can I implement to handle this better? In my perfect world, they should just get a message on screen telling them the session has gone idle ... please start over AND DON'T TAKE A NAP IN THE MIDDLE OF THE PROCESS!

Any thoughts? Thanks, as always, for any help you can offer!

Jeff
Festy
Forum Commoner
Posts: 28
Joined: Wed Jan 30, 2008 10:01 pm

Re: SESSION Time Out Error

Post by Festy »

What about using cookies instead? Easy to handle and you can make the session time out whenever you want.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: SESSION Time Out Error

Post by Christopher »

The first place to check it the manual. That session chapter is a real page turner! I don't know if they get rescued after the bridge washes out, bit is exciting. And the examples are pretty good.

http://www.php.net/manual/en/ref.session.php

If the problem is just IE then this may help:

Code: Select all

session_cache_limiter('must-revalidate');
(#10850)
Post Reply