session

How to update session array via ajax?

浪尽此生 提交于 2020-06-23 05:23:08
问题 I'm passing user input, which is just quantity and product code in this case to the php script to store into session array via ajax. I expect, each time user clicks submit and the ajax call is made, the quantity and product code will be added into session array. But now what happen is, each time it updates existing data in the session. So only one pair of data exist. This is my ajax script: <script> <!--display form submission result--> var param; var param2; var i; function sendToCart(param,

Capybara with headless chrome doesn't clear session between test cases which use different subdomains

跟風遠走 提交于 2020-06-16 20:51:52
问题 I switched my rails tests from capybara-webkit to headless chrome. When I run a test which visits not the default Capybara host the first case passes but the second one fails because the user are already logged in when they try to login I use chromedriver v2.45 , selenium-webdriver (3.141.0) and capybara (2.18.0) I have the following setup: require 'selenium-webdriver' Capybara.register_driver :chrome do |app| options = Selenium::WebDriver::Chrome::Options.new( args: %w[headless disable-gpu

Capybara with headless chrome doesn't clear session between test cases which use different subdomains

本小妞迷上赌 提交于 2020-06-16 20:50:08
问题 I switched my rails tests from capybara-webkit to headless chrome. When I run a test which visits not the default Capybara host the first case passes but the second one fails because the user are already logged in when they try to login I use chromedriver v2.45 , selenium-webdriver (3.141.0) and capybara (2.18.0) I have the following setup: require 'selenium-webdriver' Capybara.register_driver :chrome do |app| options = Selenium::WebDriver::Chrome::Options.new( args: %w[headless disable-gpu

NHibernate Transaction.Commit automatically closes Session

旧城冷巷雨未停 提交于 2020-06-13 06:33:25
问题 I have a web application that is using the absolute latest version (3.3) and is using session-by-request session management within a HttpModule, so there are no problems with multiple session conflicts. Unfortunately, I am finding that the session is getting automatically closed immediately after I perform a Transaction.Commit which I only do when I am actually performing a Create, Update or Delete. I am finding this within my NHibernate log. I know for a fact that I am not doing it, because

Flask session not persist data

跟風遠走 提交于 2020-06-11 10:13:06
问题 I have a Javascript application and a Flask application. When the user send data from Js to Flask, I store it on session and it works fine at a specific route: @app.route(...) def user(...): session['name'] = name print(session['name']) # Works ! But when I tr to get the values on session from another method / route the session is empty: @app.route(...) def current(): print(session.keys(), session.values) # Empty ! I have installed Flask Session and set the config to: 'SECRET_KEY': b'...',

When exactly does a php session expire?

≯℡__Kan透↙ 提交于 2020-06-01 13:38:41
问题 I've googled around about this and what I know so far is that the session is destroyed when the browser is closed and if the browser is just kept open, the session automatically expires after a fixed amount of time like 24 minutes. But when does the counter for these 24 minutes start? When the server executes the session_start() line? This question might be a little long but please bear with me. Assume i have a php page with this code in it: <?php session_start(); ?> If a user open this page

When exactly does a php session expire?

柔情痞子 提交于 2020-06-01 13:35:41
问题 I've googled around about this and what I know so far is that the session is destroyed when the browser is closed and if the browser is just kept open, the session automatically expires after a fixed amount of time like 24 minutes. But when does the counter for these 24 minutes start? When the server executes the session_start() line? This question might be a little long but please bear with me. Assume i have a php page with this code in it: <?php session_start(); ?> If a user open this page

When exactly does a php session expire?

ε祈祈猫儿з 提交于 2020-06-01 13:35:37
问题 I've googled around about this and what I know so far is that the session is destroyed when the browser is closed and if the browser is just kept open, the session automatically expires after a fixed amount of time like 24 minutes. But when does the counter for these 24 minutes start? When the server executes the session_start() line? This question might be a little long but please bear with me. Assume i have a php page with this code in it: <?php session_start(); ?> If a user open this page

Laravel login form - email is not correct

我是研究僧i 提交于 2020-06-01 07:42:26
问题 When I try to login with a form in Laravel and save session to redirect in home page, I always get the message that the email required is not correct even if it is correct This is the controller: public function welcome (Request $request) { { $this->validate($request, [ 'mail' => 'required|email', 'mdp'=> 'required' ]); $patt= patient::orderBy('created_at','desc')->get() ; foreach ($patt as $log ) { if (( $log->Login== $request->input('mail') ) && ( $log->Password== $request->input('mdp') ))

Laravel login form - email is not correct

試著忘記壹切 提交于 2020-06-01 07:42:07
问题 When I try to login with a form in Laravel and save session to redirect in home page, I always get the message that the email required is not correct even if it is correct This is the controller: public function welcome (Request $request) { { $this->validate($request, [ 'mail' => 'required|email', 'mdp'=> 'required' ]); $patt= patient::orderBy('created_at','desc')->get() ; foreach ($patt as $log ) { if (( $log->Login== $request->input('mail') ) && ( $log->Password== $request->input('mdp') ))