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
-
2
votes1
answer408
viewsDisconnect user when logging into another account
Hello I wanted to know how to disconnect a user if he enters another account in the same browser with the same IP, PHP use Séssion, if you can help me thank you so much!! Because the user can log in…
-
2
votes2
answers60
viewsSession without www and www php
Hello, I’m having a problem, it happens that the user log in to www.meusite.com.br page his session is not in meusite.com.br, because it has this difference of without www and with www? Can someone…
-
2
votes2
answers386
viewsWhat(s) problems will I have with using ob_start() and ob_end_flush()?
My application is a website for a real estate company and I’m having problems with a feature developed with Session similar to a shopping cart to add more than one property in a single proposal. The…
-
2
votes2
answers232
viewsRestrict access to a folder on the server after login
I have the following problem: I have 1 application used by 5 users... For each user there is a folder on the server, because for each one there is a configuration and some files are different, so…
-
2
votes2
answers302
viewsCodeigniter session expires quickly
I made a control panel for a customer and in this panel my client can edit the products of the site. After the customer Edit a product and click on Save, When the client will try to edit more fields…
-
2
votes2
answers3935
viewsGrab user id by SESSION
I have a question , how do I get the id of the guy who logged in to my system? So that later he can change his data. <?php if (isset ($_POST ["loginUsuario_externo"])){…
-
2
votes1
answer4806
viewsLogin with angular 4
I am learning angular4, and would like to know a way to login with the same. I can already get the backend data, but how do I set up the session? (I came from php, there was only use). I saw…
-
2
votes1
answer60
viewsBest way to filter (validate) rescued $_SESSION data
I am creating a register and I have a session $_SESSION['usuario']['cpf']; I am validating the data I receive by POST and GET with the function filter_input PHP. However, the documentation says:…
-
2
votes2
answers1874
viewsWhere is a PHP session file stored?
I’ve read about files related to $_SESSION, but I would like to find them. Where they are stored?
-
2
votes1
answer1003
viewsDestroying Session and Session Objects in JSF
I’m using session.invalidate(); to invalidate the session, but when I access the Tomcat mailer it shows me that the session still exists. The following code shows me that even after using the…
-
2
votes2
answers290
viewsSecure Login with Remember
I need help with a login script. The problem is that the session is automatically expiring after a certain downtime. I would like to increase the native limit of session of my pages, because the…
-
2
votes0
answers20
viewsPrevent grouping of PHP Sessions
I have a PHP system that uses Sessions to store items, I recently noticed that when the user simultaneously opens 2 tabs of the browser upon completing the request the system groups or understands…
-
2
votes1
answer428
viewsCodeigniter Session Error:
This session error appears in the codeigniter system. The errors pointed out by php: ini_set('session.use_trans_sid', 0); ini_set('session.use_cookies', 1); session_start(); Standard Controller…
-
2
votes2
answers420
viewsC# Web Forms - Missing Session
I have an application in Web Forms that stores the session when the user logs in, with a time limit of 21 minutes without using the application to expire the session: <sessionState timeout="21"…
-
2
votes1
answer885
viewsCreate https session with ajax http request
I’m developing a site where the client side initially accesses http until they log in. The login is done from http itself with an ajax request that calls the php script in https and in this script a…
-
2
votes1
answer1263
viewsWhat is the difference in storage between session, cookies and localstorage?
Where is the storage location of each of them? the local storage I heard it’s from html5 and it’s better that session and cookie, what the difference between them?…
-
2
votes0
answers657
viewsTurn Rowdatapacket into object to create login session
Good morning. I am making a Node.js application that when logging in you must save the user attributes (database attributes such as name, surname, email, id, etc). But when you have it displayed on…
-
2
votes1
answer104
viewsMapping active and disconnecting users to exceed 3 users
I wonder how I could map the users who connect based on their unique id’s and id session so that when there are more than 3 sessions for that id, the users who connected first are removed from the…
-
2
votes1
answer201
viewsUsing Sessao on a MVC controller returns error
I am trying to use session in an MVC application, I believe you are right but it is returning the error: Undefined object reference for an object instance when it tries to pass the value in the…
-
2
votes0
answers67
viewsSession not holding value
My SESSION is not storing the values during its useful life. Here I used to demonstrate a var_dump: var_dump($_SESSION); array (size=3) 'no_pessoa' => string 'Wander Carlos' (length=15)…
-
2
votes0
answers128
viewsHow to differentiate sessions in browser guides?
In a web application implemented in Java using JSP and Servlets, if I store information in the user’s session, this information is shared from all tabs in the same browser. How to differentiate…
-
2
votes2
answers821
viewsSessions of different systems on the same server
Scenario (example) I have 2 systems: Sistema Padaria Posto System Details The database is separated, then each system with its users and passwords. There’s "common user" among the 2 (e.g.:…
-
2
votes1
answer107
viewsreturn of array_search() considered false condition
In my code, in the login screen I search in the comic the number of blogs that belong to the same user and put the ID of these blogs in an array, then assign it to a session variable (I want my code…
-
2
votes1
answer63
viewsHow to keep PHP session during long upload
Hello, I have a basic authentication system using Session for a file-upload system However, when some user with slow internet puts many files in the upload queue (10 or more files), and each file…
-
2
votes1
answer443
viewsStore several values in the same instance of a PHP session
Good morning, everyone, I’m trying to create a shopping cart, and I’m racking my brain with what seemed to be something simple I’m learning now about programming languages, and I’m having trouble…
-
2
votes0
answers83
viewsDatabase variables are not added in $_SESSION array
I am building a cart for an application. I want to add the name, quantity and price of the product inside the cart. For this, I do: In the header I include in the pages accessed by the client:…
-
2
votes1
answer345
viewsWhy does the express session return 'Undefined'?
I’m having trouble recovering data from req.session. I have a sub-router that manages the main route and use a middleware to manage the session. I add the data I want to record in the session, but…
-
2
votes1
answer378
viewsBlock direct access to a php page
I’m making a login page where the user, when logging in index.php it goes to the.php dashboard. I was able to block access to the.php panel with SESSION, but if I access connected.php (where you…
-
2
votes0
answers60
views -
1
votes1
answer562
viewsTimeout Session using Stateserver
I have an application in cluster who wear the Session, to give no problem I put another machine to serve Session Server and set up the web.config as follows: <sessionState mode="StateServer"…
-
1
votes1
answer469
viewsMaintain subdomain sessions with Cakephp
I’m having trouble keeping sessions active between system subdomains, I’m using Cakephp version 2.4.7, I’ve added the function below in App/bootstrap.php ini_set('session.cookie_domain',…
-
1
votes3
answers901
viewsInfinite loop with $_SESSION and redirect
What would be the best practices for maneuvering the following PHP code? if(!isset($_SESSION['email'], $_SESSION['senha'], $_SESSION['nivel'], $logado)){ header("location: index.php"); } And it’s…
-
1
votes1
answer698
viewsSession is closed! Spring + JPA (Hibernate)
I’m trying to make an example of JPA + Spring. But I’m having trouble managing transactions. persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0"…
-
1
votes1
answer100
viewsDoing research inside a Session
I have a role in controller that returns me one JSON, who picked up a JQuery and mount my page. I, store her return in a Session, as below: SessaoUtil.SalvarSession("PegaHotelPacote",…
-
1
votes1
answer500
viewsHow do I redirect the login page to the control panel when I am logged in?
With this code I redirect from the control panel to the login page visitors who are not logged in. <?php session_start(); if (!isset($_SESSION['username'])){ header("location: login.php"); }…
-
1
votes3
answers591
viewsFind joomla session variables for php
A client has a site made in joomla, and I have to integrate the login that he does on his site to my site in php. But I don’t know how to get joomla session variables. How can I get them? Or how can…
-
1
votes1
answer234
viewsJavascript: Master Tab
I need a certain function in a project, I need some functions only run in a tab of my site, for example... The user is in the tab HOME but the flaps SOBRE, CONTATO are open and on this site plays an…
-
1
votes0
answers133
viewsTomcat7 cluster does not replicate session
I have an Ubuntu with 2 Tomcat7 with the following cluster settings: The balancer is Apache MOD_JK. SERVER.XML: <Engine name="Catalina" defaultHost="localhost" jvmRoute="no0"> <Cluster…
-
1
votes1
answer117
viewsBest Way to Provide Sessions for DAO’s
I was researching on the internet ways to inject Sessions in the DAO’s this: Hibernateutil This way is to implement a utility class that will configure, instantiate and make available an object…
-
1
votes1
answer740
viewsHow to temporarily store data with good practices?
I have only one page where are all the scripts, when a user clicked on certain data, would redirect it to a specific script and needed to save this data (which he clicked) to put in a case he wanted…
-
1
votes0
answers387
viewsProblem with Codeigniter session
When I authenticate the user in my application, I save some user information in sessions. This is done in Controller User, Only when I recover this data in another controller, they don’t exist. When…
-
1
votes2
answers1206
views -
1
votes1
answer275
viewsHow to maintain a Session after re-running an application?
In my MVC 5 project, a session with the user data is created in the login and after the re-execution of the application the Session no longer exists, however, the authentication Coockie still…
-
1
votes1
answer162
viewsCodeigniter 3.0 Library Session
I made a function to log on to the system, however, when using the function sess_destroy() to destroy the session, it does not allow you to display the set_flashdata(). When I remove the function…
-
1
votes2
answers1049
viewsSmart session with Codeigniter
I have an application developed with Codeigniter, PHP and Mysql. The user’s session has always been treated according to the Codeigniter standard, but now I need the session to be more restrictive,…
-
1
votes2
answers1301
viewsHow to Save and Recover All Sessions of a User
I am developing a system in which I need to recover all users logged in or with active session on the server. Context: When the user logs into the system, in addition to creating the Session, save…
-
1
votes1
answer281
viewsJSF cluster application
What my application (JSF + Primefaces) needs to work with in a cluster? I am doing a test in a cluster 3 Tomcat environment (with session replication) and my test application does not work. At first…
-
1
votes1
answer1351
viewsIs it possible to get the name and value of all Sessions by javascript?
I am creating several Séssions, and would like to get the name and value of all by Javascript. When creating two Sessions in Asp.Net MVC, for example: Session["usuario"] = "user"; Session["tipo"] =…
-
1
votes1
answer64
viewsScript Problem with PHP Checking Session
I have a form but it is hidden only when clicking a button located on the Nav is called that function: <script> function verifLog(){ <?php session_start(); if (isset($_SESSION['user'])){…
-
1
votes0
answers149
views"Leak" by Session
Something strange happened while we were using the system on the NET. Well, every time a user logs into the system, I store his ID as follows: $_SESSION['usuario']['uid'] = $id_user; and direct you…