logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Questions about session behavior
Author
jhsachs



Joined: 03 Aug 2010
Posts: 8
Location: Northern California

PostPosted: Mon 06 Jun '11 5:51    Post subject: Questions about session behavior Reply with quote

My client has some needs that seem to be best met by using session variables, which naturally require sessions. I haven't worked with sessions before, and I need some advice.

I don't have problems with the mechanics of defining and using sessions. I need to know about the subtler aspects of their behavior, such as gotchas to watch out for.

I'm particularly concerned about continuity of sessions. Suppose, for example, that a user is in the middle of a session and her browser crashes, or she suffers a power outage. When she returns to the site, will the server automatically recognize her and restore the session? If not, can my script do that for her, and what is the best way to do it? Is there a reasonably graceful way to restore her to the page she was on at the time of the crash if she enters the URL of the site's home page, instead of the page she was on?

This question is kind of open ended. The items above are examples of the kind of things I need to know, but the information I really need is the information that I don't know I need to ask for!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7305
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Jun '11 11:06    Post subject: Reply with quote

I guess this is more related to your web page programming rather than apache itself.
Back to top
jhsachs



Joined: 03 Aug 2010
Posts: 8
Location: Northern California

PostPosted: Mon 06 Jun '11 17:28    Post subject: Reply with quote

Is that a meaningful distinction? Sessions are managed by the server, and session continuity is the server's responsibility. Actions I take to deal with situations the server can't handle itself will probably be implemented in scripts. I don't think we'll get much insight by considering one to the exclusion of the other.

I'm programming in PHP, in case that matters, but in my thinking, it's incidental.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7305
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Jun '11 21:56    Post subject: Reply with quote

If you are using PHP the sessions are handled by PHP. Of cause you can use cookies to reuse a session. But you are better ask in a PHP forum than in an apache forum.
Back to top


Reply to topic   Topic: Questions about session behavior View previous topic :: View next topic
Post new topic   Forum Index -> Apache