session-variables

Setting a PHP $_SESSION['var'] using jQuery

I need to set a PHP $_SESSION variable using the jQuery. IF the user clicks on an image I want to save a piece of information associated with that image as a session variable in php. I think I can do this by calling a php page or function and appending that piece of info to the query string. Any ideas. I have found little help thro...

How to access session variables from any class in ASP.NET?

I have created a class file in the App_Code folder in my application. I have a session variable Session["loginId"] I want to access this session variables in my class, but when I am writing the following line then it gives error Session["loginId"] Can anyone tell me how to access session variables within a class which is created i...

How to send SendEnv variable to sftp session using java

I want to send SendEnv variable to sftp session using java code. How can I achieve this using java. It can be done using command prompt as follows: export RDIR=4 sftp -o SendEnv=RDIR user@ ...

Session Best Practices

Hi I use Sessions in my application and I was wondering what is the best practice for maintaining session value on a page. I need the value that is stored in the session to be saved until the post back on a particular page. Let me illustrate: Page A: Page B: Sets Session["ID"] = 5 --> Gets Session[...

PHP Session Variables Not Preserved

I am unable to use session variables on a page other than the one where they are set, IOW they act like non-session variables. I have found a similar question posted in half a dozen other similar fora, but the answer in those other cases always turns out not to apply. Here are my files: sess1.php <?php session_start(); session_regi...

Best way to maintain an autocomplete/suggest list across sessions

Hi, I would like to maintain a list of all of the strings entered into a ComboBox across all uses of an application on a given PC, for use as the AutoCompleteSource for that ComboBox, i.e., I enter in "Fred" in the ComboBox, commit the data, close the application, reopen the application, reopen the ComboBox, type "F", receive the suggest...

SEO and Session Parameters

Hi, If we develop a site with SEO compatible, is it possible to use Session Variables? If not what is the alternative? Thanks many. Best regards. ...

ASP.NET - Disappearing session variables

I am working a current web application for a client and I am having some trouble with session variables disappearing on me. I will try and set up a good description of the scenario as best I can. It does not happen on any page other than the page I created to allow users to modify the strings stored in a resource file. It shows up WHE...

How does one discard a session variable while closing Web Page?

Hi all. We are following a procedure in our work while developing a web page, is to bind page to one or more session variables, these session variables are used only for that page, to hold current processing objects, so while closing page no need for them. How could I discard these session variables while closing page? Any suggestions ...

safest way to create sessions in php

i m working on a website..... and wants to create user login and their session..... what is the safest way to check their session exist or not( like cookie or session variable check)..... or any better idea then using sessions in php ...

Asp.Net MVC and Session

I'd like to construct an object in different steps in an asp.net mvc application, each step being a different page. The sort of thing you'd store in Session in a quick Web.Forms application. Reading about it, Session doesn't seem to me as something very asp.net MVC'ish. However I can't really think of other alternatives to this situatio...

Is there way to be notified when a session variable changes?

Is it possible to be notified in code when a session variable changes? Will give an example to make it clearer. Its a normal ASP.NET site, with a master page and content pages. I want to show an image for the state of a user, ie logged in or not(2 different images). Instead of checking a session variable on every page_load of the master...

Mocking a Customer SessionHandler Object in ASP.NET MVC for Unittests with Rhino Mocks

Hi folks, I currently use the following approach to create a strongly typed object representing session variables. public abstract class SessionController : Controller { private const string SESSION_NAME = "UserSession"; public SessionData SessionData { get { SessionData sessionData = (SessionDa...

Problem setting PHP SESSION variables within cross-domain iframe

Coles Notes version: index.php?map_id=foo is loaded into iframe on www.not-my-domain.com. index sets SESSION['map_id'] = foo. Flash file tries to get SESSION['map_id'] thru Authenticate.php, but Authenticate.php has no values set for any SESSION varaibles. -- Only first-load, cross domain issue. Verbose: I have an index while where I...

Struggling with acceptable use of Session variable in ASP.NET

I tried to wean myself of lopping everything in a Session variable in ASP.NET (I came from a Windows programming background), and I generally completely stopped explicitly storing anything in a Session variable. Can anybody give some guidelines as to what you feel are acceptable uses of session variable? Here's a specific example...I l...

cakephp - session variable keeps acting strangely

For reasons that elude me, a session variable that contains the customer's name will show up for a short while, and then disappear. In the app_controller.php : beforeFilter() if (isset($_SESSION['customer_name']) == false || strlen($_SESSION['customer_name']) == 0) { $customer = $this->Customer->read(null, $auth['User']['custo...

Session Variable Member?

I'm using a compiled .dll provided by someone else -- I know little about it, other than it has a session variable that I must access in a way that is strange to me. Not sure what to call it -- have googled for words that I thought might be right, but so far no success. Here is what it looks like: Session("receipt").username It's the...

memory occupied by session variables

Possible Duplicate: How to find out size of session in ASP.NET from web application? Hi, Is there any way to know the memory size occupied by session variables in asp.net application? Thanks, P.Gopalakrishnan. ...

Using log4net with ASP.NET to track Session variables

Our web app captures a user's login and stores it in a session variable, similar to Session("User_Id"). I'd like to use log4net to capture the User in the log. I see a few references to using the MDC (Mapped Diagnostic Context) has been replaced with ThreadContext properties. Has anyone implemented this ThreadContext approach? An...

Problem unsetting a session variable.

There's a form on my site that's used for inviting friends. It's a simple text field and a submit button. If there is an error I redirect back to this page and display an error message if their is a session variable set. if (isset($_SESSION['invite_error'])) { echo $_SESSION['invite_error']; unset($_SESSION['invite_error']); } H...