Most voted "session" questions
A session refers to all requests a single client makes to a server. The session is user-specific and for each user a new session is created to accompany that user’s entire request.
Learn more…416 questions
Sort by count of
-
4
votes2
answers579
viewsReliability and Security of Sessions
I’ve been reading a little bit about security with sessions (both in ASP.NET and in PHP), and I read in some places that sessions, especially in PHP, can be easily stolen (even more easily if the…
-
4
votes3
answers2362
viewsHow to Recover User Session
I just wanted to retrieve a user’s session. I have a class called User system, that identifies which user is logging in. In this class, I take the session and play for an object. @ManagedBean(name =…
-
4
votes1
answer717
viewsLogin system with permission levels
I am developing a login system with permission levels, however, at the time of logging in as administrator, on a page that Adm would be allowed to enter, permission is denied. It’s like my SESSION…
-
4
votes1
answer574
viewsHow to redirect to the login page after a certain idle PHP time?
As the title of the question says I would like at a certain time where the user is idle, and so the system destroys the session and automatically redirects to the login page. I know php has the…
-
4
votes1
answer792
viewsDelete php session when closing browser
I’m using Codeigniter to develop a project that involves a restricted area. I am using session to store user data that is logged in. I need this information to be deleted when closing the browser,…
-
4
votes0
answers38
viewsIs there a more correct way to handle redirects in authentication streams? (e.g., HTTP Status 302, or Javascript, or auto-Ubmit form)
I work on a project where we have a Frontend application and a second Backend application (Nodejs) that takes care of authentication and contains a REST API. In the authentication part, Backend…
-
3
votes1
answer365
viewsCakephp loses SESSION after a redirect
I’m doing an integration with Facebook Login. When the user clicks to log in using Facebook and accepts the application he is redirected to a method that creates a SESSION and redirects. The problem…
-
3
votes2
answers26487
viewsBest way to make a script to logout
I am developing a system in which it is accessed with the login and password, once logged in the user has the option to logout, follows below my script: if(isset($_SESSION['logado'])){…
-
3
votes3
answers1145
viewsAsp.net MVC Session ends
I have an app ASP.NET MVC 4.0 on a server of Kinghost. In my web.config I’ll tell you what: <sessionState timeout="1000"></sessionState> <authentication mode="Forms"> <forms…
-
3
votes1
answer15992
viewsSet time to expire $_SESSION
How to adjust the time to expire $_SESSION? attempts.. Include in top of files (worked on offline localhost) ini_set('session.gc_maxlifetime', 3600); // 1 hora ini_set('session.cookie_lifetime',…
-
3
votes2
answers1804
viewsDestroy sessions in PHP
I was researching on functions of logout in php and saw some examples like: if(isset($_SESSION)) { unset($_SESSION['minhaSessao']); //repetir para cada sessao session_unregister();…
-
3
votes1
answer6009
viewsCheck if a filled-in session exists
I’m having trouble checking if there’s anything within the session. The functions I’m using are: Function to check if you have someone logged in if(usuarioestalogado()){?> <p…
-
3
votes1
answer273
viewsCustom Session generated by spring
I have the following scenario: an application nodejs that saves the session in redis. another spring q application also saves the session in redis. I would like to share this same session between…
-
3
votes3
answers22145
viewsHow do I check if a session ($_SESSION) exists or is active in PHP?
there is some native function of the PHP that you can use to verify that a particular user session is open? For example, I have a $_SESSION['usuario'] = "400379d4eaa6ec24826dd44cd5cf65a3" and I want…
-
3
votes2
answers5016
viewsSession C# how does it work?
What is the lifetime of an ASP.NET MVC Session, and how to find out how to find out the remaining time and how to add more time to Session (if possible)? There is another form of value guard that is…
-
3
votes1
answer128
viewsApplication stopping when there are many users accessing
My application is crashing and I don’t know exactly why. The only thing that repair is that when there are many users accessing, or making requests it happens. When it happens I have to restart the…
-
3
votes2
answers2143
viewsLaravel - Session and Array
I need to create an array: array( 0 => 0, 1 => 0, 2 => 1, 3 => 0, 4 => 0, 5 => 1, 6 => 0) within a Session: session('session_array') and then individually add and redeem the…
-
3
votes1
answer993
viewsLaravel Session - Public for Controller
I’m making a form that contains a Captcha. The Captcha is generated by a PHP script that mounts an image. And I put the script in the folder public of Laravel 4. When the code of Captcha is…
-
3
votes1
answer1095
viewsBest practices for a login system Sessions/Cookies
I would like to know some important points when making a login system: Sessions x Cookies Which is the most appropriate in security matters? Which uses the least server resources? (case in a large…
-
3
votes3
answers792
viewsHow do Apache (wamp) stop killing the session by itself?
I developed an application with laravel and left her spinning in the wamp, but after a while it ends up killing the user session, I wonder if there is any setting for it to stop doing this? Thank…
-
3
votes1
answer92
viewsHow to know if a session already exists on a system?
I have an application where the user can only be logged in to a device at the same time, how can I do this restriction? I use the Parse.com service, it provides an API for data exchange between an…
-
3
votes1
answer384
viewsPassing a javascript variable to Session
I wonder, how do I send a value I have in javascript to a @Session. in case it would be more or less like this: I have a variable: var id = $(Person). val(); this ID wanted to use in a session…
-
3
votes1
answer206
viewsExtend PHP session using . htaccess
How to extend a session in PHP using . htaccess? I used this code below: php_value session.cookie_lifetime 28800 php_value session.cache_expire 28800 php_value session.gc_maxlifetime 28800 However I…
-
3
votes2
answers785
viewsHow to persist $_SESSION value in <select> as it was done for <input>?
I’m trying to get the value of select in the $_SESSION to persist the search data on a system I’m doing, but I don’t know how to apply this method to the select. Can you help me? I’ll save the…
-
3
votes2
answers906
viewsHow to avoid user logout when closing your browser with PHP?
I currently use SESSION. When I close the browser, it disconnects. How can I make a way in login by clicking on continue connected, user not disconnect after close?
-
3
votes1
answer92
viewsProduct displayed is the smallest within the group (Criteria)
I have a function in the system that I am developing that returns a list of lots in which the batch quantity is greater than zero, searching for the product name (foreign key). Up to this point I…
-
3
votes0
answers54
viewsSPA App in Vuejs - Use Session or not?
I’m starting with applications SPA (single page application) with VueJS. The question is about user control. I use session for this or not? For me to know how long the user was logged in, I record…
-
3
votes1
answer208
viewsHelp with step email form
Guys sorry to bother you, I’m creating a 3-step email form with 3 pages and each one is typed data in the input, I’ve already read Section tutorial and I’m not able to print at the end the data of…
-
3
votes1
answer648
viewsHttpcontext.Current.Session - Null
By a business rule of the project, whenever an object of the type ViewModelBase is instantiated, I need to perform some user profile validations to define which buttons the user will have access to…
-
3
votes2
answers3391
viewsValidate captcha before sending form
I need a very simple captcha, but it can be validated before the form is sent, how can I do it? Currently use this: index.html <form method="post" action="valida.php" id="form" name="form">…
-
3
votes1
answer1297
viewsFill in PHP session via ajax
I’m having a hard time solving a problem. I have an application in PHP that needs to fill some sessions I’m using this method to send. <script…
-
3
votes3
answers2169
viewsControl of séssions and authentication in PHP with Codeigniter
Good morning guys, I’m new to programming with PHP and I have a question: I have already developed the login system and it is working correctly, now I would like to control the access to the other…
-
3
votes3
answers810
viewsphp Session - destroy all Sessions and keep only one active
Hello, I need to destroy all Sesssions when logging out a system except for just one... someone would know how to implement this with php? For example: Let’s say I have 5 active sesssions when the…
-
2
votes1
answer624
viewsSession in a database
Thinking about the scalability of applications developed in Asp.net-mvc, I searched for alternatives not to use "session in memory". I saw that it is possible to save session data in database and…
-
2
votes1
answer85
viewsModel in sessions
I have a GRID (table) that when selecting an item through the ID I load the entity in a session via ajax. public static class Sessoes { public static Produto Produto { get { return…
-
2
votes1
answer240
viewsASP does not save data in Session
I have a page that logs in from the customer. That page goes up to the Session account id and name like this: session("user_id") = rec_user("chave") session("user_name") = rec_user("nome) I have…
-
2
votes1
answer161
viewsSessions in PHP
I’m working on a system that has a general search filter on the home screen. For this, in my header I put a select/combo box and a button 'OK'. To treat this I decided to use Sesssions, where I can…
-
2
votes1
answer56
views -
2
votes1
answer2051
viewsHow to check if a session exists (Codeigniter)
I have the following function in my Controller: private function SetImageAndColor($client_id) { if (isset($_GET['color']) AND isset($_GET['image'])) { $dados['click2call'][$client_id]['image'] =…
-
2
votes4
answers357
viewsObjectcache to provide a variable for all users
I have an application in ASP.NET and would like to cache for all users as if the variable was in pool application and everyone had access, something other than the session that makes the section…
-
2
votes1
answer50
viewsHow to get variable from an HTML form?
I have an HTML file (html1) to fill user and pass, and call a PHP file (php1) to authenticate the values. But I need the user in another PHP file (php2) how to call the value of user in the php2…
-
2
votes1
answer522
viewsLogin with Cookie or Session on PHP5
I am implementing an administrative area on my site and always used $_SESSION to log in. However, I now need the user login saved if he leaves the page. My question: I need to use the $_COOKIEto…
-
2
votes1
answer62
viewsstore SQL query in Session for further processing
I would like to store an SQL query in a Session, that is, all fields and their respective values. I’d say it’s about 12 fields, and about 150 records on average. The idea is not to have to consult…
-
2
votes1
answer124
views -
2
votes1
answer652
viewsHow to prevent a JSESSIONID from being created when accessing a JSP page?
I created a simple JSP page, which does nothing but call a Servlet to validate a login. Here is the code of the page index.jsp: <%@page contentType="text/html" pageEncoding="UTF-8" %>…
-
2
votes1
answer198
viewsError of Session in user level validation
Good guys I am making a simple panel more with user level where I pass to the Session an array with three values, so far so good, the functions that validate the form, validates the bank user,…
-
2
votes1
answer507
viewsPHP session using class
Hello, I’m new to PHP and would like to know if you can create a class to manage the user session. It would be a function to log in and another to destroy the session. If there’s a way to create,…
-
2
votes1
answer133
viewsProblem with session_set_save_handler
I’m using the session_set_save_handler to save the session to Mysql, but an error has been troubling me. When I log in to IE with a user, then close the browser without giving logout and log into…
-
2
votes1
answer867
viewsLaravel session does not work on another page
I am working on a project with Laravel, in it I created a session variable that takes a parameter of the url as follows: if(!empty(Input::get('lang'))){ $lang = Input::get('lang');…
-
2
votes2
answers1376
viewsProblems with PHP session - Continue a session
I’m setting up a client’s website and I need to log in. The user can log in normally and without error, but sending it to the main page when he is logged in is like he has not logged in. Here is my…