session

Cucumber/Selenium newbie trying to use RoR session-data in step-definitions ... and failing ...

Hi! I'm spending my first few days with cucumber/selenium trying to figure out whether RBB is the thing I want to use in my latest RoR project. My setting: Rails 2.3.5, selenium-client 1.2.17, cucumber 0.4.4 etc, quite current in my view. Following the instructions on http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium ...

Tracking information over many pages for a website

Hey SO, I have a sort of vague question that you guys are perfect for answering. I've many times come across a point where I've had a form for my user to fill out where it consisted of many different pages. So far, I've been saving them in a session, but I'm a little worried about that practice since a session could expire and it seem...

Session Management in Tomcat

Hi, I have developed a simple web-app with 2 servlets A and B. I have a few doubts related to session management for the web-app by Tomcat. NOTE - I have disabled cookies in my web-browser (Chrome) while accessing the web-app. 1.) When the web-app is first hit, Servlet A gets invoked. Servlet A accesses the session from the request a...

How to implement session based "add to cart" function in Rails

Hi I have a problem implementing add to cart functionality in my rails e-commerce app. Here I am not talking about check out function. Just "add to cart". Items can be added to cart without requiring users to log in to their accounts. Once the user finishes adding to cart, then before check out user will log in. My problem here is what i...

How to manage sessions in web-driven Iphone Application

I am Making an Iphone application which is web-service enabled. Also I have skeleton of this application.I am using rest to feed the contents of view controllers. When application is launched it is presented with Login page asking username and password. Clicking Login button sends request to server and in response xml data is fetched. Th...

Is it possible to enable/disable lazy loading for all entities across a NHibernate Session?

By default, NHibernate lazy loads all collections, which works fine for me in most cases. However, I'm running into problems with some tools that use reflection, which doesn't play well with proxied objects. In this case, I can't serialize an entity using JSON.NET because it throws an exception when it hits a proxied object. My question...

Is there a way to get the Session object from a static context?

I'm in a C# / ASP.NET project. I'd like to be able to get a handle on the Session object (HttpSessionState) from a static context. Is there there any way to do so? ...

Is it possible to remove a session by its ID?

When using the default session functionality of ASP.NET 3.5, is it possible to remove a session by its session id? Update: I would like to completely remove a specific session, not just a part of it and not just the current user's session. ...

Problem with function session_start() (works slowly).

Hi. I have a problem wtih session_start() on primary server. When I load page for the first time, it takes less than 1 second to complete request. If I'll wait for approximately 12-15 seconds and then reload page, time of loading will be the same. But when I'm trying to refresh page after, for example, 3 or 5 seconds after initial loadi...

When is a Session created?

On my login web page (i.e. the first page the user hits) I have code of this form: public class MyPage : System.Web.UI.Page { private MyClass _obj = new MyClass(); ... MyClass has the constructor: public MyClass() { var sess = HttpContext.Current.Session; // no problem here sess["MyValue"] = 123; // throws null ref exception ...

When using ruby-on-rails how do you iterate over variables stored in the session?

I want to loop through all the variables stored in the session. I checked and it appears that sessions are stored as a hash: request.session.kind_of?(Hash) - returns true I wasn't sure why the following code didn't work: request.session.each {|key, value| puts keys + " --> " + value I am trying to output all session variables as part...

PHP - count my quantity item in session array

How to count the item-qty and current code :- $q = $_POST['item-qty']; $i = count($q); $k = 0; while ($k < $i) { $select = 'SELECT * FROM location'; $query = $db->rq($select); $price = $db->fetch($query); if ($_POST['item-qty'][$k] < 3) { $get = $price['normal_price']; $price = $get * $_POST['item-qty'][$k]; ...

How do websites generally log users out automatically when session expires?

How do websites generally log users out and send them to the log in screen automatically when a user's session expires? Is this done through ajax or running async handlers? Can you give me a bit of an explanation. ...

Developing a secure PHP login and authentication strategy

Hi, I'm developing a login and authentication system for a new PHP site and have been reading up on the various attacks and vulnerabilities. However, it's a bit confusing, so I want to check that my approach makes sense. I plan on storing the following data: In the session: user-id, hashed + salted HTTP_USER_AGENT In the cookie and i...

Debug Session_OnEnd

I put break point inside Session_OnEnd in Global.asax, it seems the ASP.NET application never stop when I try to debug, any thing I missed? But I debug Session_OnStart. ...

How to include session log file

[php] $filename = "./logs/".$_SESSION['uniqueID'].".php" ; // output 4b1e7b3489549.php $data = "bla..bla..\n"; $data = stripcslashes($data); /* Writing file configurations */ $buat = fopen($filename, "w+"); fwrite($buat, "$data"); fclose($buat); ?> [/php] Now whe i call the output file from $filename (record.php) f...

Close/kill the session when the browser or tab is closed

Can somebody tell me how can I close/kill the session when the user closes the browser? I am using stateserver mode for my asp.net web app. The onbeforeunload method is not proper as it fires when user refreshes the page. ...

Can I do it with only session or do I need ACL?

I am planning to create a simple project management system with PHP/MySQL/Codeigniter. There will be a super-admin, an admin and around 20 users. User A, B, C... And there will be around 50 projects. Project 1, 2, 3 ... User A and B will be able to access project 1 pages, User C, D and F will be able to access project 2 pages etc. Ca...

How to set Timout value for Session

Wat is the default value for session timout? And how and where can I set the timeout value for session??? Plz, tell me in detail ...

activerecord_session_store vs. sql_session_store

Does anyone have more recent stats on the speed gains in SqlSessionStore over ActiveRecord Session Store? Is anyone out there using SqlSessionStore because of gains over ARStore? More of a curiosity I guess. Seems there isn't a lot new on the SqlSessionStore side since like '07, even though the github.com repos show updates as late as ...