Questions tagged [session-variables]
Session variable is a unit of information within a session state. It is maintained across a user's visit within the constraints of the stateless HTTP protocol.
3,851
questions
-1
votes
0
answers
52
views
Role id into $_SESSION returns null
I wanted to save the role id into $_SESSION via a fetch() (see code) but when I try to vardump($_SESSION) it returns null for my role.
I tried looking around but nothing really talks about what I want ...
1
vote
2
answers
109
views
Set variable to an expired session out of a view in Django
I’m trying to set a variable to an expired session out of a view in Django.
I’m aware of django’s documentation on Using sessions out of views. But in my case, I try to set a session variable in a ...
0
votes
0
answers
28
views
In flask, can I not name a session variable using another varible?
Im trying to do:
@app.route("/process_page_data/<page>", methods=["POST"])
def process_page_data(page):
print(f"\n process {page} data... \n")
session[f&...
1
vote
0
answers
21
views
Missing Session variable in ASP.NET MVC 4
I encountered a missing Session problem. After days of investigation, I found out the Session is missing when it tries to call AJAX post trigger by SignalR from localhost.
I have a local Windows ...
0
votes
1
answer
34
views
Express.js not saving session data
I am building a web app and I would like to assign every client a random user ID (which should be retained across sessions). For this, I am setting the userId session variable.
const app = express()
...
0
votes
1
answer
90
views
How to store an int userId in asp.net core razor website
Seriously struggling to have a decent solution to access an int userId value across multiple pages
So I am not an expert. Just when you feel competent a problem like this comes along.
I have a asp.net ...
0
votes
0
answers
95
views
Supervisor (superuser) approval of root superuser login in Django
In my Django project with two superusers called root and supervisor, I'm trying to implement the following flow:
When root logs into the application, he is directed to a 'waiting for authorisation' ...
0
votes
0
answers
13
views
i got an error session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent [duplicate]
my error
A PHP Error was encountered
Severity: Warning
Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent
Filename: Session/Session....
1
vote
1
answer
48
views
How can I redirect users to different pages based on session in PHP?
im trying after put username and password redirect to other page named panel.php but after the put currect values in form destination page redirect me again to login form. my login code ->
<?php
...
0
votes
0
answers
38
views
SQL Array and session variable [duplicate]
I have an array in a PostGreSQL query and I can't turn it into a session variable.
The table resulting from the query sends this: {1,2,3}
if I transform this into a session variable I have the same ...
0
votes
0
answers
50
views
How to store Power BI session data without Localstorage?
I am developing a custom Power BI visual. In my use case, the visual need to authenticate the users to a third party server with the Oauth2 protocol. When opening the report, every user should have a ...
0
votes
1
answer
74
views
How to read Gmails using the api?
so I was able to put a code together that allows me to retrieve unread messages from last 48 hours , thanks to @LindaLawton-DaImTo.
here, I'm having problems to prettify the output (which is in a html ...
0
votes
1
answer
40
views
Use session_set_cookie_params or session_start options
Where should session cookies options go? in session_start or session_set_cookie_params?
The documentation at php.net is a bit unclear one these as they don't mention session_set_cookie_params. Are the ...
0
votes
1
answer
117
views
Can't access session variable even with session_start()
I have trouble accessing my session variable from one page to another. When I access the response from the page that sets the session variable as a regular JSON response, I can confirm that the ...
0
votes
0
answers
40
views
Access to another page by only clicking on the link and preventing page access by entering url in browser
Is it possible to redirect a user back to 1st Page if they directly try to access the 2nd Page by entering the url on the browser and not the given link on 1st Page.
I have a link which I need the ...
0
votes
2
answers
69
views
DataTable row indexes do no match the order when bound to Gridview
I have a Gridview with different items, ordered by the integer column "Order". I am saving the DataTable that feeds the Gridview as "Session Parameter".
Item Order ...
0
votes
0
answers
36
views
Block PHP Webpage except through Redirect from PHP webpage using Session Variables
I am trying to block access to my webpage except it is accessed via a successful button click on a verification page.
The backend of the verification has been handled and it works as expected. I ...
0
votes
1
answer
116
views
Temporary table or View with session variables, which one to use and why?
I am new to Snowflake. I have a basic question. I have a large dataset that I need to use in a join with other tables.
*Should I use a temporary table, or a view with session variables for this ...
0
votes
0
answers
40
views
Spring Session results in spam: ORA-00942: table or view does not exist
I'm new to Spring and Java. I'm trying to setup session management using Sprint Session but I'm getting error spam on the server. I followed this guide:
https://www.javainuse.com/spring/...
0
votes
0
answers
42
views
How can I show/hide data and update the button label with Symfony
I'm using Symfony 5.5 and I want to have a button that show/hide data when the user click on it.
My code was working but I've noticed that when I leave the page and came again after, the button wasn't ...
2
votes
1
answer
87
views
Custom Session Handler With JSON in PHP Destroy Session by Mistake
I have a task to implement my Custom Session Handler in PHP, where data from each session is saved in a specified directory in a JSON Text file.
Here is the code (it's a combination of code from ...
0
votes
2
answers
35
views
Session value not working in SelectCommand of SqlDataSource for DetailsView
i have a webapplication in .net and use a DetailsView.
im control this DetailsView with a SqlDataSource. i set a session with jquery.
<script >
var baseUrl = (window.location).href;...
0
votes
1
answer
59
views
Update prices for shipping methods dynamically in WooCommerce
I am trying to update the shipping prices for my shipping methods dynamically. I get the shipping costs from an API and I want to update the prices when the I successfully get the prices from the API ...
0
votes
1
answer
407
views
Using session storage on Flutter web
The libraries I have seen and use allow to store on local storage, but is there a way to store data easily on session storage with Flutter?
Thank you.
-1
votes
1
answer
42
views
Why can't I see the session variables set previously?
I have two processes. The first (#1) sets some session variables and also creates a cookie with the session_id in it. The second (#2)reads the cookie and runs this code:
session_id($_COOKIE['...
-1
votes
1
answer
31
views
New session created for each instance in Perl web app using CGI::Application::Plugin::Session
Caveat: similar to, but still different from this thread.
In a home-rolled ecomm app, a session with a param of order_id is created by a Perl module common to all instances when an item is added to ...
0
votes
0
answers
67
views
Is there a way to modify session varaibles in mybatis?
For example, the MySQL group_concat function will truncate at 1024 characters, and I want to change it to a bigger size. Where can I set SET SESSION group_concat_max_len=2048 when using mybatis?
I ...
0
votes
0
answers
19
views
having trouble while using token::generate function for CSRF protection
this is my token class.
class Token {
public static function generate(){
return session::put(config::get('session/token_name'),md5(uniqid()));
}}
and following code where i use it ...
0
votes
1
answer
27
views
Authentication status and private routes bug i cant figure out
im trying to implement zustand for statae management into my app, and im having a problem makind it work with the private routes i allready implemented, the flow is thus:
"authenticated" is ...
0
votes
0
answers
29
views
How to pass a link into a custom Action
currently I have define a Custom Action where I am validating whether a client machine has .net 6 installed or not and a appropriate message I am passing through session message. like below.
string ...
0
votes
0
answers
53
views
Understanding HTTP sessions in JSF as session attributres are going null unexpectedly while working actively on the application
We're having a very large web application, entirely built with JSF (2.0)/PrimeFaces (8.0). Running on remote Tomcat 8 server (Linux OS)
We are facing a very serious issue due to which our server logs ...
0
votes
0
answers
21
views
file get content failed to process sometimes
we are trying to create a captcha over files
but we face wired issue , sometimes file is process even though that it is existing
issue is appearing for first post request , and only sometimes not ...
0
votes
0
answers
43
views
PHP Captcha - Session from generated image ist not stored
I have a form that generated a captcha, which of course will be checked afterwards. This also worked great in my test environment.
Now i have integrated the form in a onlineshop and it doesn't work. ...
0
votes
0
answers
9
views
What should I do to maintains the background change for all session, until the user wants to change?
I try to open a session that changes the background style. However, to link button to background, I use Javascript and add a class by calling a function when I click, as right here:
Trying to change ...
0
votes
1
answer
52
views
How to set session timeout in Struts2?
How to set session timeout in Struts 2:
import java.util.Map;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
public class ...
0
votes
2
answers
74
views
C# ASP.NET MVC view: problem with retaining model, variable, or ViewBag data when View calls Action repeatedly
I have a model for a batter average web app. After entering the player's name and how many games in a series to average, I wish to collect hits and atbats for each game. There is a class called Game ...
0
votes
2
answers
830
views
How do you access HttpContext.Session in an ASP.NET Core 7 Web API?
I've created an ASP.NET Core 7 Web API, and I need to store some values in session memory, but I am getting this exception:
Unable to resolve service for type 'Microsoft.AspNetCore.DataProtection....
0
votes
1
answer
70
views
How can I implement session handling in Blazor?
In all web technologies like PHP or ASP.NET there is the concept of sessions.
Blazor doesn't seem to have that at all.
As soon as I switch to a new page, I lose all data.
I don't understand why there ...
0
votes
2
answers
29
views
How to send name of the image clicked to the next php page?
I am making a website for movie ticket booking , I have added several images of the movie posters in the landing page. I wanted to make it as when the user clicks on the image of a particular movie ...
0
votes
0
answers
47
views
Loading an error message to the next view
I have a controller that is accessing an external API to load data, when a certain page is loaded. Now I wanted to have an error message being displayed when the page is loaded but the external API ...
-1
votes
1
answer
90
views
PHP Session Variable Issue
I have a project which is react js and laravel php.I have two apis, one generate_otp an second verify_otp. Now the generate_otp works and stores the otp in session. I tested it by returning the value ...
0
votes
0
answers
103
views
How to extract & display easily in Chrome a sessionId variable from HTTPS URL
I currently authenticate (login/password) to a website in chrome with UI, and need the sessionId, which is not shown directly in the main URL in tab.
So I retrieve it manually in Developer Tools from ...
0
votes
0
answers
192
views
Still logged in after deleting Cookies and Session Storage
I have seen the following behaviour with at least two webpages so far using Chromium browsers, no idea whether this is the same for Firefox browsers:
When I hit Clear Site Data in the DevTools while ...
0
votes
0
answers
39
views
Send local data to web application by double-click on file
I have written a js-based web application which is used on my company internal network. With this application I can manipulate some data and store it as json-files with a proprietary file extension, ...
0
votes
0
answers
35
views
How to access ASP session variables from native IIS HTTP module
I'm writing a native C++ IIS HTTP module, the kind that starts with the RegisterModule() function. I'd like to access the ASP session variables, but I don't see anything in httpserv.h that seems &...
0
votes
0
answers
22
views
Session is empty object {} on react but working on postman
I have session based authentication (the website is for one person so its one-user auth type)
i setted up the backend nodejs with the following:
pacakges used : cookie-session, cors
const ...
0
votes
0
answers
58
views
Session Function Not Working Variable cannot be Called
We have a plugin that relies on $_SESSION variables. It is not working. We have set up a simple test to set the variable with set_session.php
<?php
session_start();
$_SESSION['test_variable'] = '...
0
votes
0
answers
15
views
Failing to pass data between forms using Session Variables asp.net mvc c#
I have this method coded for the Page Load for one of the pages and within it I need to retrieve a single client from my bank database using a LINQ query. I used traditional LINQ syntax and the where ...
0
votes
0
answers
273
views
gpt-35-turbo does not memorize messages in PHP
I created a Telegram bot that responds to user messages using the OpenAI GPT API. Everything works fine, but there is an issue. With the gpt-35-turbo model, it is possible to add parameters to ...
0
votes
0
answers
57
views
Gatling error: While using session variable in JSON path for consecutive check method
I want to get value of “@id” for “hardwareId”: “-1517125410” and using the value of “@id” get the expiration date where “hardwareId” == “@id” using Gatling
For e.g.: For “hardwareId”: “-1517125410”, ...