Questions tagged [session]

A session refers to the communication between a single client and a server. A session is specific to the user and for each user a new session is created to track all the requests from that user.

From Wikipedia:

A session is a semi-permanent interactive information interchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user (see Login session). A session is set up or established at a certain point in time, and torn down at a later point in time. An established communication session may involve more than one message in each direction. A session is typically, but not always, stateful, meaning that at least one of the communicating parts needs to save information about the session history in order to be able to communicate, as opposed to stateless communication, where the communication consists of independent requests with responses.

An established session is the basic requirement to perform a connection-oriented communication. A session also is the basic step to transmit in connectionless communication modes. However any unidirectional transmission does not define a session.

References:

44567 questions
9
votes
5 answers

How to access the globals $_SESSION and $_COOKIE from a laravel app?

I am working on a laravel project that needs to work besides a custom php project, because that I need to get access to the pure php globals $_SESSION and $_COOKIE in the laravel app. Until now I'm geting just null or empty. Somebody know how to do…
gvsrepins
  • 1,687
  • 2
  • 17
  • 20
9
votes
1 answer

how can I force a refresh of req.user?

I am using passport.js with local authentication strategy for my node.js/express app. The user returned by LocalStrategy includes things like email and username. I want to give users the ability to update their email or username within the app.…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
9
votes
2 answers

Create an interactive logon session

I'm trying to create a utility similar to Microsoft's abandoned Super Fast User Switcher (download), which allows fast user switching without going through the Welcome screen. I have a working implementation using the undocumented WinStationConnectW…
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
9
votes
1 answer

viewExpiredException JSF

To handle viewExpiredException in JSF, I coded javax.faces.application.ViewExpiredException /error.html
user234194
  • 1,683
  • 10
  • 38
  • 56
9
votes
3 answers

How to handle session timeouts as a user is saving a form?

Our system has a one hour session length. Occasionally this will expire just before a user presses a 'Save' button on a form. When the session times out, they get kicked back to the log in page and their data is lost. This is obviously bad. I'm…
mpen
  • 272,448
  • 266
  • 850
  • 1,236
9
votes
4 answers

AWS Elastic Beanstalk and PHP sessions

I currently have a php application in development on an AWS EC2 instance but I've decided to move it to Elastic Beanstalk to take advantage of the autoscaling functionality. While most of the application migrated to the new Elastic Beanstalk EC2…
Sean
  • 309
  • 1
  • 3
  • 10
9
votes
4 answers

What is the best way to create a PHP login page?

I'm fairly new to PHP and am looking for some best practices on how to implement authentication in PHP. I'm an evangelist for Adobe and one of the things that annoys me is when people use Flex/Flash for the login screen. So I want to do a blog…
ryanstewart
  • 1,004
  • 10
  • 18
9
votes
1 answer

Should I use Database Sessions or Native PHP File Sessions?

I've just moved over from my own MVC framework to a community supported one (CodeIgniter). I'm just converting my sessions over to the CodeIgniter functions and am noticing that they, by default, store the session data in an encrypted cookie. The…
Ryall
  • 12,010
  • 11
  • 53
  • 77
9
votes
3 answers

how can i extend the cookie expiration time in php everytime i i regenerate the session id?

I have a session manager page: sessmgr.php. This page is supposed to validate the user log-in information, set the cookies and keep the session variables alive by updating the cookies expiration time and regenerating the session id by an XML HTTP…
Abhishek
  • 93
  • 1
  • 2
  • 5
9
votes
4 answers

PHP empty session files generated by login system

Recently I've noticed that many blank sessions are being created, I'm not sure why though as I believe I'm doing everything the correct way. At the moment we create a session when a user either logs in or registers, we then check whether a user is…
Dan
  • 11,914
  • 14
  • 49
  • 112
9
votes
3 answers

ASP.NET MVC - Secure Temporary Storage of Credit Card Data

I have a checkout process for a shopping cart that is currently storing credit card data in the session for retrieval once the user finalizes the purchase. The purchase process is set up such that the user inputs the credit card, views a…
Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
9
votes
5 answers

What is the best way to read the Rails session secret?

I would like to access the Rails session secret programmatically (I am using it to generate a sign-on token). Here's what I've come up with: ActionController::Base.session.first[:secret] This returns the session secret. However, every time you call…
Luke Francl
  • 31,028
  • 18
  • 69
  • 91
9
votes
2 answers

.Net weird session bug - variables disappearing due to new session during postback

I've got a really, really strange problem which I'm hoping someone can shed some light on. We have a form which has been causing us problems, and through debugging etc. realised it was due to a session variable that was 'randomly' disappearing. We…
PoorbandTony
  • 380
  • 3
  • 12
9
votes
1 answer

Session control with Google Analytics API v3 for iOS?

I just replaced GA implementation with API v3, and found this useful session managing feature: https://developers.google.com/analytics/devguides/collection/ios/v3/sessions Since I implemented, every session is measured 00:00:00. Did anybody managed…
Geri Borbás
  • 15,810
  • 18
  • 109
  • 172
9
votes
1 answer

Flask session not persisting

Am running with Python 2.7, Apache + mod_wsgi on CentOS 6.3 Things work fine when I am on localhost. However, when I run the code on a vm in Azure, I do not see the session information being persisted across pages. Basically in my views, I have…
El Diablo
  • 303
  • 1
  • 4
  • 7