session

Session time out with Timer in ASP.NET(C#)

I want to time out the session with timer, I am implementing a ecommerce project, where I required when user add first product in the cart a timer will start and user add more products in the cart but user did not checkout the cart product within a specific time the cart session is timeout(cart empty). How can acchive this. ...

Access asp.net variables

I have a session variable that I want to access in a Silverlight 3 application. How can I do it in the best recommended way? ...

Notify user when session time out in asp.net

What is the best way to show a message to user after session is expired? By then, the user should be logged out and redirected to start page. I can use javascript to redirect user to start page. I just want to show a message on start page. ...

PHP - same server, different domains require different sessions.

Hello, I'm implementing login and registration for multiple domains that talk to a single database - we'll call them i.domain-a.com and i.domain-b.com. Both these subdomains have A records in the DNS that point to a single server - thus making i.domain-a.com/hello.php and i.domain-b.com/hello.php run the same thing. So, if I create a s...

Sharing PHP session (or similar) between deamon and page requests.

I need to keep a persistent connection open across multiple page requests. You cannot put PHP resources into the session. My solution is to trigger a deamon on the first request and keep the PHP resource there. I then need to get the deamon to talk to my different page requests. I could do this the long way by using a database or file b...

Shortcut to setting/getting variables in $_SESSION?

I have like a hundred or so form elements in a multiple-page form and I have to check if certain session vars were defined or not. The main thing is I have sub-namespaces within my sessions by way of a CONSTANT and then a fields key. Is there some shortcut to doing say, <input value="<?php echo isset($_SESSION[CONSTANT]['fields']['fir...

(PHP) How to destroy the session cookie correctly?

I'm trying to correctly log out of an admin user. Here is my function: function logout() { $_SESSION = array(); //destroy all of the session variables if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params["path"], $params["do...

Following Authlogic tutorial but: undefined method `email' for #<UserSession: {:unauthorized_record=>"<protected>"}>

I followed the official Authlogic tutorial but something came up. I successfully created a user, but when I try to show his profile page, I get the following error: undefined method `email' for #<UserSession: {:unauthorized_record=>"<protected>"}> Here's the relevant code: # user.rb class User < ActiveRecord::Base acts_as_authe...

ASP.NET Help! FireFox is eating my cookies!

IE works fine, but FireFox does not. I am setting a cookie on my default.aspx page: HttpCookie hc = new HttpCookie("guid", guid.ToString()); hc.Expires = DateTime.Parse("12/12/2010"); Response.Cookies.Add(hc); My upload control (I'm using SWFUpload) submits to upload.aspx. On upload.aspx I call: if (Request.Cookies[...

Find user by authentication token in Rails?

So for a certain project I'm thinking it may possibly be useful for me to be able to take an authentication token and figure out which user it is for. I'm not sure if it's even possible or not. Anyone happen to know? ...

How is HttpOnly get set for ASP.NET_SessionId cookie?

In my web project setting to turn on httpOnlyCookies is not there. It is false by default. Also there is no place in code where cookie is being set to HttpOnly. However, when I browse to the site I can see that ASP.NET_Session cookie is being passed as HttpOnly. How is it set to HttpOnly? ...

What is the best way to show a preview page? Sessions? Cross-Page Postings? Ideas?

I'm trying to avoid using a session varible here. Bascially, the user can add a lot of text to a text box. It can be formatted with HTML. When they click a preview button they are redirected to a 2nd page which renders the HTML. It gets the data using PreviousPage cross-page posting. But when they go back to the original page to continue...

multiple sessions are opened for one visitor

Hi, LAMP test server - only I am visiting it: I have a website and for some reason I get multiple sessions per user (browser). I am browsing the page with one browser only and I get 5-6-7-8 session files in /tmp. What can be the reason for it? Sessions are simple file based sessions. I noticed that I get multiple sessions when I upda...

RackSpace Cloud Strips $_SESSION if URL Has Certain File Extensions

The Situation I am creating a video training site for a client on the RackSpace Cloud using the traditional LAMP stack (RackSpace's cloud has both Windows and LAMP stacks). The videos and other media files I'm serving on this site need to be protected as my client charges money for access to them. There is no DRM or funny business like ...

Restrict content access to logged in users with PHP

I have a LAMP setup and I just want to be able to protect content on the webpage (images,css,videos,etc) so that only logged in users can access it. I realize I can do this easily with .htaccess. However I do not want to use the authentication popup, and I want to be able to use sessions and also be able to logout. I am using php to do...

ASP.NET Session Issue

I have a custom ASP.NET session manager class as follows: public sealed class SessionManager : Page { private const string USER = "User"; private static readonly SessionManager _instance = new SessionManager(); private SessionManager() { } public static SessionManager Instance ...

How to fix Zend session incorrect data ('css')

I have coded a simple admin module with ability to paginate records and sort them by some column. And when I sort and then call some other action on the records it should redirect the user back to index page with the same sort parameters as there were before. But after I call the indexAction() with parameters like this /admin/users/inde...

Loading iframe from bookmarklet on 3rd party sites kills CakePHP Session

Hi folks, I am trying to pop up an iframe from a bookmark whose contents are from my test app. The test app doesn't do much but let me log in and set some session vars. First I developed this using Perl's Catalyst framework, and it worked great. I could log in to the test app in some window, or the iframe, and it would keep the session ...

How to scope NHibernate sessions and transactions in a WPF application

I am relatively new to both WPF and NHibernate and attempting to build an application that combines the two, using the MVVM pattern. However, I am struggling to understand when and where my application should open and close NHibernate sessions and transactions. From what I have read, it is recommended that sessions should be kept as sho...

PHP Login via sessions doesn't work on first attempt (in new window)

So I'm working on an application that requires a user to login before accessing any 'sensitive material'. The login script works like this: User enters U/P->Script validates data->If valid, SESSION variables are set. This is a very strange problem, since SESSIONS are handled by the server. The problem: When first opening the script i...