Is there a way to access variables outside of the class? ...
Currently, I am working with a collection of PHP server-side scripts that manage user session state by utilizing PHP sessions extensively for authenticated users. For the client side within a mobile application and using Jquery ajax, I am striving to esta ...
What is the process for updating a session in the server side using authV5 in the most recent update of nextjs? I have attempted the following: import { update } from "@/auth However, I am unable to locate the update function within the auth module ...
Trying to figure out what is missing in my code. I have a simple logging.php file on the server. Passing parameters like user/password creates a new session. Using loggout will destroy the session. And passing report displays a list of current session var ...
After successfully using a session variable to store login data locally, I encountered an issue when transferring the files to the server. For some reason, I kept getting logged out between pages. In an attempt to solve this problem, I came across a post o ...
Currently, I am facing an issue with the following code in my app: app.use(session({secret: 'JKSBDFJKQS444SQ4DQSND'})); After running my app file, I encountered this error: Error: Most middleware is no longer bundled with Express and must be installed ...
I am currently testing out this code snippet that I found online: var io = require('socket.io'), express = require('express'), app = express(), server = require('http').createServer(app), connect = require('express/node_ ...
Currently utilizing client-sessions with the following code snippet: app.post("/login", (req, res)=>{ if (!req.session.activeUser){ User.findOne({username:req.body.username}).then(doc=>{ req.session.activeUser = req.body.use ...
strtotime($_SESSION['starting_timestamp']) I attempted to convert the MySQL timestamp stored as $_SESSION['starting_timestamp'], which has a value of 1422094831. However, when I applied strtotime function on it, it did not return any value. I am unsure a ...
After running once, the code in deactivate_myaccount.php throws an error stating: "Notice: A session had already been started - ignoring session_start() in C:xampphtdocsincludesincludesheader-inc.php on line 2". Furthermore, the intended functionality ...
I am looking to save the username of an account into session storage. I am currently using node.js with the expressjs framework and have attempted to utilize connect-redis for storing sessions, following a tutorial on expressjs. Can someone please guide ...
I have a unique setup where I am using a cross domain and PHP server to retrieve user information when they log in. On my website, I incorporate PHP code that includes: session_start(); After a successful login, I declare the user information as follows: ...
I'm struggling with setting and retrieving session variables using JavaScript code that calls PHP functions via AJAX. I want to access the returned session field in my JavaScript, but nothing seems to be working. Can someone take a look at my code and poin ...
Why are PHP session variables not transferring across servers? This example is being used to troubleshoot the issue. Please review. file1.php <?php session_start(); $_SESSION['FirstName'] = Kshitij ; $_SESSION['LastName'] = Kawatra ; ...
I am new to the world of node.js and JavaScript in general. I have a piece of code that currently handles login functionality by checking if a user exists in a MYSQL database. This part is functioning correctly. Now, I wish to improve this feature by crea ...
Upon user login, I store user information in browser sessions on the client side (using Angular) like this: $window.sessionStorage.setItem('loggedInUser', JSON.stringify(val)); For logout authentication on the backend (using Passportjs), I have set up th ...
I am managing three services - be, fe, and auth. These services are all hosted on App Engine with a load balancer set up to keep them under the same domain. My goal is to create a session upon user login. The issue I'm facing is that even though the set-co ...
In the process of creating a server-side workers manager script, I have encountered a challenge with managing multiple instances in the same browser. Currently, each instance saves job data in $_SESSION and calls itself with the next task to be completed. ...
Recently, I delved into the world of nodejs and decided to create an authentication system. Following a tutorial, I successfully implemented it. To retrieve the user object after authentication, it is necessary to store it in the session. This was achieved ...
Learning PHP has been quite a journey for me, especially when it comes to working with SESSIONS. I recently started using the Instagram API and managed to successfully authorize an app, redirecting to a page to display content. Organized in my main folde ...
I successfully imported data from a CSV file into PHP and organized it into a nested array. To ensure the data is easily accessible across different files, I stored the array as a session variable. Now, the challenge lies in accessing this session variable ...
I am exploring the option to store the user id in the MySQL Database's sessions table using express-mysql-session. Initially, I set the user id in the middleware as shown below: import "dotenv/config"; import express from "express" ...
Hello, I am trying to add a comment to a blog while displaying the name of the patient who added it using session. However, I encountered the following error: Undefined variable: visitor This is the commentcontroller.php: public function store(blog $getI ...
I have a unique system where each client is assigned their own subdomain. Users are currently able to log in directly from their subdomain, but I am looking to enable login from the main domain as well before redirecting them to their respective subdomains ...
It feels like I have asked this question countless times already, but none of the answers seem to satisfy me. So, here I am trying once again, being as clear as possible. I am setting up a fresh Express project using the usual terminal commands: user$ ex ...
I've been working on a script that echoes different answers based on selected values. Right now, I'm just testing with one value but plan to expand later on. The PHP script is triggered through AJAX so the results display on the same page. Howev ...
Whenever I close all browser windows and reopen the web app, a new session is initiated, forcing me to re-authenticate each time. To give you an idea, my web application framework is <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfema ...
Currently, I am working on a straightforward project involving a shopping cart where I extract data from my database. One part of this shopping cart allows users to delete a single item, and most of it is functioning as expected. The issue that I am encoun ...
While working with node.js, I've been considering storing a session id in the session variable to verify user authorization for each page request by checking against the database. However, this approach seems inefficient as it involves a database call ever ...
I'm currently working on implementing session variables in Joomla with AJAX when checkboxes are selected. Below is the code snippet from select_thumb.ajax.php file: $_SESSION['ss'] = $value; $response = $_SESSION['ss']; echo ...
I am seeking a solution that will allow me to remove a specific item from an array when that item is clicked. For example, if I click on "Two", it should disappear. See a demonstration here: CODE: <form method="post"> <input type="text" i ...
Is it possible to retrieve values stored in a PHP website session from a separate C# program running on the same machine simultaneously? If not, is there another way to capture the current textbox value and store it in a C# variable? ...
Hey there! I'm looking for a way to continually monitor changes in a session variable within PHP. Let's say the session variable "x" starts off with a value of "1" and then, after five seconds, it changes to "2". This session variable "x" is updated usin ...
Having developed a multilingual website using PHP and MySQL, I am currently facing issues related to robots, SEO, and search engines. This is mainly due to the fact that the language selection mechanism relies on cookies. The current process is as follows ...
Greetings! I am currently using Sanctum to authenticate users in the system. My goal is for a user who logs in to vue project num1 to also be automatically logged in to vue project num2. I attempted to implement this functionality using cookies like so: $ ...
I am currently utilizing passportJS for managing login and persistent sessions on the server backend. While everything functions properly when sending requests from the server frontend (a webpage that I didn't create and lack sufficient knowledge to ...
Currently, I am attempting to configure a Next JS application with iron-session and a 'remember me' feature. The objective is for the maxAge of the iron-session cookie to be extended to a week if the user selects the remember me option on the login form, a ...
Why does the session information not get saved? When I reload the page, the session variable 'mucciusersess' disappears. What could be causing this issue? Thanks... I have a cookie on the client-side with a value like 'mucciuserid' set to '122341212' ...
I have implemented a method within the controller to retrieve the value of a session variable. However, when I attempt to call this method from Ajax jQuery, I am unable to obtain the value. Interestingly, if I try to read the session value from another met ...
I have integrated session.socket.io into my application. o = require('socket.io').listen(tmpServer), appCookieParser = express.cookieParser(settings.cookie.secret), appRedisStore = new RedisStore(), sessionIO = new SessionSockets(io, appRedisSto ...
I've been working on establishing a secure authentication process for my Next.js project, but I'm feeling quite lost at the moment. Despite referencing the examples in the Next.js repository, I still have numerous queries regarding a comprehensive solution ...
I am currently working on a web application using SailsJS and AngularJS. My project requires session management to track user login status. I came across this helpful tutorial and implemented an index.ejs view located in the /view folder. Within the index. ...
Here is my issue: I want only one session to run at a time. Consider the following query: $get_crs_mysqli .= (!empty($_SESSION['userSearch']))?(" AND (course_title like '%".$_SESSION['userSearch']."%') OR (course_title like '%" . $_SESSION['userCategory'] ...
Is there a way I can transfer the data from a text box to another page (demo2) and store all the information in my database? I attempted to use sessions, but although the value is being passed to the next page, the text box data isn't... Check out the fol ...
Encountering an issue with the js-cookie library while working on my Node.js application. I'm utilizing it to handle cookies, particularly setting a cookie called 'gameData' with the value 'value'. However, when attempting to retrieve the cookie value usin ...
I've been experimenting with the client-sessions middleware in my nodejs / Express project and encountered an issue that says: Cannot set property 'mydata' of undefined. While researching this problem, I came across a post on Stack Overflow ...
When it comes to writing PHPUnit tests for ajax endpoints, I find it easy when the user doesn't need to be logged in. However, for the specific endpoint I want to test, the user must be logged in and I need to programmatically retrieve the cookie as part o ...
I have successfully integrated the express-socket.io-session into my app and it is working as expected. However, I have encountered a specific issue. Please see the code snippet below: io.use(...); io.sockets.on("connection", function (socket) { soc ...
In my PHP project, I am trying to implement a check on the Login page to verify the status of the session. If the session is not set, I want the user to be redirected to the login page. However, the code I added to the login page seems to cause a loop. if ...
Using express and express-session with mysql on nodeJS has been successful for me. I managed to set up a cookie and session as well. Take a look at my code: app.use(cookieParser('3CCC4ACD-6ED1-4844-9217-82131BDCB239')); session({resave: true, saveUniniti ...
In my current NodeJS code, I have the following: let sql = `SELECT box_id, cubby_id, occupied, comport FROM box WHERE longestDimension = ? AND LOWER(box_id) = LOWER(?)`; connection.query(sql, [boxSelectedDimension, ...
My server-side session creation is functioning properly, but I need to be able to hide certain elements in an Angular2 component template depending on whether the session exists. How can I check within my Angular2 component whether the server-created sessi ...
I've implemented a login system that generates a unique token for each login attempt, which is stored in the `$_SESSION['loginToken']` variable. After submitting the login form, it checks if the session value matches the input from the form. Additionally, ...
Is there any way to terminate or cancel a session when I depart from a specific folder on the website, like /maps/, or simply end it when I'm not certain URLs? At present, I am utilizing: <script> $(window).on('unload', function() { var fd = n ...
When working with sessions in express.js, I know that we can access a session id using req.session.id, and this id is always unique each time we visit a route. I've seen some suggestions to get and store the session globally. However, the issue arises whe ...
Working on a school project involving a Weather info web page has been quite the journey. Most of it is complete, except for one issue that I can't seem to figure out. The index page with login and registration functions is connected to phpmyadmin/mys ...
While utilizing Blocktrail's API for bitcoin wallet management, I encountered an issue with circular references within the returned wallet object. The goal is to store the decrypted wallet in the user's session to avoid password re-entry. However, attempt ...
I've been working on a simple nodejs application that allows users to log in with Facebook using express and everyauth. I followed the instructions provided in the README tutorial here and set up my app.js file as shown below: var everyauth = require('eve ...
Currently, I am in the process of developing a node js app and attempting to implement a user authentication system using Mongoose-Auth. Despite following several tutorials and guides on how to use Mongoose-Auth, I have encountered a hurdle. The basic pas ...
I am currently developing a web application that involves authentication process and session management using express. I have successfully implemented the backend sessions functionality. Now, my goal is to display on the user interface the information of t ...
When I try to create a session variable in a PHP file with the index 'fullName', I encounter an 'Index not found error' when attempting to retrieve the variable from Dokuwiki's main.php. The session values are not being saved in that session. However, if I ...
I'm currently working on a real-time chat using Socket.IO, but I've encountered a major issue. The aim is to allow users to log in, select another connected user, and start chatting... var http = require('http'), fs = require(&ap ...
Currently, I am in the process of developing an Authentication page using React and Express, where JWT is also implemented. In the backend, I have created the following routes: server.js ... app.use( cookieSession({ name: "prode_session", ...
Currently, I am delving into the world of Node.js and I find myself pondering the best approach to handle sessions. Upon my investigation, it appears that there are primarily two options available: express-session and cookie-session. Sources suggest that ...
I have successfully set the session using code on Postman. First: I set my session and it is functioning properly. const user = { name: 'afshin', }; req.session.user = user; res.status(200).send({data:req.session.user,status:200}); Second: Now, when I ...
Even after multiple attempts, I have discovered that iOS 5 does not accept cookies by default. Despite trying various approaches, including utilizing Redis, I still cannot maintain a session for more than one request. Considering the limitation with cooki ...
Currently, I am utilizing Passport for authorization and storing sessions in MongoDB using the 'connect-mongo-session' module. One issue I have encountered is that sometimes, when attempting to log in after some time has passed, the req.user object becomes ...
I'm currently working on implementing remember me functionality for my Node.js server using passport for session management. However, I've encountered an issue where the session cookie connect.sid is not being destroyed on browser close, which sh ...
Currently, I am diving into learning Express.js and exploring how to build an API while connecting it with a React frontend. During this process in Express, one of the key components I am utilizing is express-session for managing sessions. Additionally, fo ...
In my application, I am utilizing spring-security and jQuery. The main page loads content dynamically into tabs through Ajax. Everything seems to be functioning correctly, but occasionally the login page pops up inside one of the tabs. When I enter my cred ...
I am encountering a major issue with sessions. I am working on developing an application using "Redis" in node.js along with various libraries such as express. However, I have run into a problem where the sessions are no longer functioning properly. Desp ...
Current Progress: Successfully implemented a system to upload multiple images simultaneously. The workflow is as follows: upload.php: Displays an HTML form for users to select and upload desired images. upload-script.php: Called by upload.php, this scrip ...
My nodejs application is encountering issues with express-session when running on gcloud production, although it works perfectly in my local development environment. app.js var express = require('express'); var path = require('path') ...
Currently, I am working on a web application that utilizes Angular and Express. To handle database updates, I have implemented a REST API and incorporated SocketIO for real-time client updates. I have managed to track a list of active socket IDs for each ...
Currently, I am in the process of setting up passport for authentication on my node.js web application. However, I am encountering some difficulties with properly storing session data. Right now, it seems like the session data is not being stored at all. ...