session

Codeigniter object in session?

Hey guys, I'm starting out with CI and there's something I don't understand. I'm writing this login page and I'd like to add the users object to the session. How do I do that? The user object comes from my user model.. For a new instance I write: $this->load->model('user_model', 'user'); but this won't work: $this->session->set_userd...

Strange problem with session.invalidate()

I have strange issue with logging in and out. I've implemented container-based security. I have Login/Logout links on all my pages (through template.xhtml) that are rendered or not based on backing bean boolean property (it's actually method isLoggedIn()). Also in backing bean I have method logout which is the action for Logout link (it'...

PythonWin saving session state

I would like to be able to save my session state within the PythonWin editor (e.g. these three files are opened and positioned in these particular locations within the PythonWin window). I can get handles to each of the child windows within PythonWin using win32gui, as well as the titles of each of the files and the positions/sizes of t...

PHP Native OS 'Remember Me'

Sorry if the title was misleading. I want to know how to trigger the default OS password keeper when a user successfully logs in. Example: I use Chrome in OSX, whenever I login somewhere I get the option for Chrome to save my login info, which stores the info in my keychain. This is not a question about a 'remember me' checkbox for the...

PHP session_id() not accepting existing session id

I'm having trouble forcing sessions to restart in PHP. Here's the problem: I can get my session id with session_id(), copy it, and add to the very top of my script: session_id('the_session_id'); session_start(); And when I open a new browser, the session from the other browser is not carried over. What settings can I check? ...

Simple and general Client-side Persistence solution?

Hi all: Have to say I wish I could implement server-side persistence (i.e., session-based and/or database-based user state persistence), but unfortunately my uni's server has limited resources provided and it is really hard to implemented a Perl based session solution (CGI::Session and Apache::Session not installed, dated Perl version, ...

PHP: session seems to be lost after header redirect only on IE...

Hi, I can't find a good answer for this anywhere. I have a login page, and after a good login it redirects to main page. In FF, and chrome - works perfect. On IE it doesn't work. I keep losing the session when I get to the main page. I have checked the following: - session_start at top - no blanks or anything befoer header redirect - o...

Force session ID from request

Does anyone have any thoughts about why this wouldn't work? if(isset($_POST['PHPSESSID'])) { session_id($_POST['PHPSESSID']); session_start(); var_dump($_SESSION); } The var_dump($_SESSION); is always empty! It should be loaded with stuff! Are there any settings that prevent forcing session IDs? Auto start is not enabled. ...

How to create a session object?

I am creating a login page for my web application. I want to create a session object whenever a new user logged in. I know the concept of sessions, but i didnt used that before. Can i do it with a simple class. Or, i have to move to servlet. If i shall do it with a simple class means, how to create a session object. This is my scenari...

Inconsistency in CakePHP session handling (re: cookies)?

We had a situation where sessions were being re-started immediately after logging in to a CakePHP app over SSL. It was pretty much as described here: http://stackoverflow.com/questions/308659/session-not-saving-when-moving-from-ssl-to-non-ssl and the original author's suggestion fixed the issue (although we'll try to implement somethin...

PHP | Fotolia API and "Invalid session ID"

Hi, I am creating a class in PHP to work with Fotolia API. In some cases there is a need to authenticate the request. I have created a method which is listed below : private function prepareContext( $request ) { $context = array(); $context['method'] = 'POST'; $context['content'] = $request; $context['header'] = "Conten...

Is it appropriate to use Microsoft.Practices.EnterpriseLibrary.Caching with ASP.NET?

Working on a legacy ASP.NET application we've found that ASP.NET session gets used for caching some objects, but for some objects Microsoft.Practices.EnterpriseLibrary.Caching gets used. Is there any reason to use Microsoft.Practices.EnterpriseLibrary.Caching over standard ASP.NET Session? Edit In my scenario, the Enterprise Library c...

OAuth, Sessions, Servlets

I'm trying to implement OAuth for a Twitter app with Servlets/JSPs but I have a question. Since I have to redirect the user to the Twitter authorization site and pull request parameters from the callback, how do I exactly keep all this in one session? My assumption is that when I redirect/forward the user to the new site that's gonna b...

PHP Form Key Niggle ?

Hello again, Can someone look at my two functions below and suggest what i can do?, i have created two functions that basically creates a unique key and this is echoed in a hidden field in a form and then straight after i check if the form has been submitted the second function checks to see if the key in the hidden field matches the ke...

object session in playframework

How I can store an instance object foreach user session? I have a class to modeling a complex algorithm. This algorithm is designed to run step-by-step. I need to instantiate objects of this class for each user. Each user should be able to advance step by step their instance. ...

PHP Sessions not transferring after forms and redirects

I have secured pages that all check for a set session variable to determine logged in users, pretty standard stuff. Where I run into problems is when I submit form information to a backend page that will process that data and then redirect to a success/failure confirmation page. In that time the session gets lost, at least the session ...

Do I need to call SaveOrUpdate() after calling Merge()?

for reference I'm using version 2.1.2.4000 of Nhibernate. I've spent pretty much an hour or so reading up the difference between Merge() and SaveOrUpdate() and no explanation attempts to just answer a really simple question?? I know that Merge() will do all the magic to synchronize the detached objects with cached or out of date instan...

preventing multiple user login for same user in java

hey Guys, I am using java with struts2 framework .and sqlserver 2005 database . i need help in preventing multiple user login with same username. i tried using session .. m new to this framework . if any one could help me it will be great . i did by using a flag in database and setting it to true .. and while logout it will be...

How can I pass a PHP variable to javascript?

I want to use a PHP variable as a javascript variable - specifically I want to user the PHP variable session_id(); and use this as a javascript variable. <?php $php_var = session_id(); ?> <script language="JavaScript" type="text/javascript"> js_var = <?php echo($php_var ?>; </script> This seems like it should work for me but it doesn...

.htaccess alongside sessions and cookies

I'm currently working on a website that has a .htaccess authentication user/pass (I'm really not familiar with this type of authentication). I want to know if it's possible to pass the data from that form to a session or a cookie or do I have to pass to a normal login system. Reference links are welcomed :) ...