session

PHP Session/Cookie problems with Windows XP, Vista, IE and certain users...

Hi guys, I've mentioned it on here before, but still have the problem, so have added some extra info :) We have a local intranet site that everyone on the network uses, maybe 5% (or even less) of the users that use the site have problems where the session isn't stored properly. I've tried defining a path manually and whereas most user...

How to avoid user interruption when deploying a website on IIS 6.0/.NET 3.5

We deploy our websites as a single MSI package. We deploy to IIS 6.0 (Windows 2003) and they run on .NET 3.5. The problem I have is that when we upgrade to a new version of our websites, users may be half way with a long-running task. What I need is the following: How to stop users from starting new requests Let users with long-running...

iPhone Bookmarks and Session variables (User has to log in twice)

Hello, I'm creating a web application meant to be viewed by iPhones, Blackberrys etc. My problem is that, when an iPhone user adds a link to the app on their home screen, they have to log in twice. The cycle goes like this: User bookmarks the app's homepage User later goes to the homepage They are brought first to the log in screen Af...

Safe timeout value for codeigniter session class?

I am using codeigniter's session class to handle my PHP sessions. One of the session variables automatically created on every visit to the site is session_id: The user's unique Session ID (this is a statistically random string with very strong entropy, hashed with MD5 for portability, and regenerated (by default) every five minutes) ...

Whats wrong with this php code, keep getting Error no 2?

<?php session_start(); // After user logged in session_regenerate_id(); $_SESSION['logged_in'] = 1; $_SESSION['ip'] = $_SERVER['REMOTE_ADDR']; $_SESSION['agent'] = $_SERVER['HTTP_USER_AGENT']; // Session Checking function session_check(){ if(isset($_SESSION['logged_in']) && !empty($_SESSION['logged_in'])){ if(isset($_SES...

Store List to session

is it possible to store list to session variable in Asp.net C# ? ...

ASP.NET MVC - Alternative to Using Session

I have an ASP.NET MVC view that uses jquery.Uploadify to post files to one of my controllers for use in my application and one of the side effects I noticed with Uploadify is that when the Flash file Uploadify uses to submit files to the server posts to my controller it gets its own SessionID from ASP.NET. This would be fine, of course, ...

Session_End code on browser close

I have a method I need to run on Session_end. Is there any way I can ensure the code runs when a user closes his browser? This may be a dup queston. I saw one response doing a call to ajax unload or something, but I don't want this to fire everytime a user navigates away from a page, just when they close their browser. Thanks, ~ck ...

Need to save block of data in ASP.NET between page refreshes in web farm without using inprpc or state server

I have an asp.net application running in a server farm. So In-proc sessions are out. There's no state server. There's a sql server database (can't be used for state server). There's no forcing same web server serving capabilities so no guarantee which web server will serve next page. I need to save a block of data (big object state) be...

To improve login code in PHP by Sessions

Which one is the better way to handle login in PHP? #1 PHP.net $email = $_POST['email']; $password = $_POST['password']; if($user->connection($email,$password)){ // user logging validation session_start(); //start the session $_SESSION['user_logged'] = true; // user logged in header('location : ...

Classic ASP session and Web Garden (multiple workers)

We are having issues with IIS6 slowdowns when using more than 1.2GB of RAM in a single worker and would like to use more workers. However looks like ASP sessions are made by worker and when the browser accesses some page through another worker it losts the ASP session. Do you have some tips on how to solve this problem? We are consider...

How to force an IIS hosted WCF or ASMX [webservice] to use session object readonly?

Hi ! While making my first ajax attempts, I decided also, to go to use IIS hosted WCF now. The strange thing is, that the WCF cannot process several requests parallel for the same user/session, if sessionmode is enabled! If sessionmode is disabled on asp.net, the requests are processed parallel. The broser/client may execute several dif...

To set up a login system by Sessions in PHP

I found the source of the problem #2. It is the use of *session_register(foo)*. I put the following to my *handle_registration.php*. session_register("foo"); session_register("foo2"); $foo2 = $_POST['email']; $foo['email'] = $_POST['email'] The problem still persists, since no variables are stored to my session cookie. This is th...

Using session like ViewState

I am fixing an ASP.NET application that makes heavy use of session to track per-page data. One of the problems is that the session bleeds between pages. ViewState would be a better solution, except: The data is not serializable There is too much data to be sending back and forth each postback So I want to: create a page key for t...

How to conditionally assign ActionController::Base.session in rails 2.3.3

I have a rails app that has the following content in the config/initializers/session_store.rb file: ActionController::Base.session = { :key => '_app_session', :secret => 'a really long string here', :expire_after => 2.minutes } ActionController::Base.session_store = :active_record_store So during normal operations ...

To see the types of login variables in PHP's sessions

How can you see the type of variables: POST, GET, cookie, other?, after running var_dump($_REQUEST)? I run the following start_session(); --- other code here -- var_dump($_REQUEST); It gives me array(3) { ["login"]=> string(0) "" ["sid"]=> string(32) "b3408f5ff09bfc10c5b8fdeea5093d3e" ["PHPSESSID"]=> string(32) "b340...

Passing variables across a multi page form in php

Forgive me as I am a newbie. I have a multi page form in which I am using $_SESSIONS to record the variables. <?php session_start(); foreach ( $_POST as $key=>$value ) { if ( $key!="submit" ) { $value= htmlentities(stripslashes(strip_tags($value))); $_SESSION[$key] = $value; } }` I have two problems actually. W...

To understand PHP sessions with sub-arrays better

How can you see the assigned value of the following SESSION variable? I run the following after start_session() $_SESSION['login']['email'] = "ntohuh"; I get after printing with print_r($_SESSION); ( [login] => Array ( [email] => ) This question is based on this thread. ...

Maintaining session accross HTTP and HTTPS in ASP.NET

I have a site with a form which must be served over HTTPS. There is a smaller form which is served on most other pages which acts as a teaser to draw visitors to the main form. When the small form is submitted, in the OnClick of the button, I'm storing the values from the small form in the session, then Response.Redirect the user to the...

NHibernate NonUniqueObjectException when reattaching objects to the session (with Lock)

Basic order of execution: A collection of PersistentObjects is queried then cached separately from the session. The collection is passed to a module that needs to reattach them to the session in order to lazily load some of the properties (using session.Lock(obj, LockMode.None)). After the module has completed processing, another modul...