session

PHP/MySQL strange problem affecting fetch from database only when user logged in..

So I have this function that gets data from database and echoes it. The function takes from the database the article id, article title, and some other data.. When the user is not logged in, the function works good and shows all the data, but when a user is logged in, suddenly only the article title is fetched.. All the data is in the sa...

Python: Redis as session backend to Beaker

Anyone had success with using Redis as Beaker backend? Can you tell me link or library how to do it? I am looking for any library which does this but could not get anything out of google search. ...

How do I register type with Unity where constructor parameter is HttpSessionStateBase?

I've got interface IImportManager with SessionImportManager that implements this interface. SessionImportManager's constructor must be passed an instance of HttpSessionStateBase in order to work properly. How should I register IImportManager with Unity? I've tried _unityContainer.RegisterInstance<IImportManager>(new SessionImportManag...

Help: get the sessionKey using facebook-java api.

I am developing facebook application. In this application, I use java api provided by Google and the application is based on web. I have the facebook_api_key and facebook_secrete, but how to get the sessionKey? This code is not web-based: FacebookJsonRestClient client = new FacebookJsonRestClient(Test.API_KEY, Test.SECRET); String tok...

Session issues accessing Apache Tomcat application beyond a Proxy

We have a application running on Apache Tomcat. When the application is accessed from beyond a proxy, the session information is getting lost or the user is logged out after some time. Please advise. ...

Anti flood : session or db stocking ips

Hi, right now I'm using an antiflood function in all my websites : function flood($name,$time) { $name = 'tmptmptmp'.$name; if(!isset($_SESSION[$name])) { $_SESSION[$name] = time(); return true; } else { if(time()-$time > $_SESSION[$name]) { $_SESSION[$name] = time(); return true; } else { return false; }...

Query with session : Is this the correct way?

I have developed a membership script with php for learning and I have confused in a session issue: In login.php, after username and password query there is: $_SESSION['user'] = $aut_user['user_name']; $_SESSION['user_id'] = $aut_user['user_id']; and after this, page redirects to user.php. In user.php I have used this query: $id = $...

Sharing a session between Node.js app and Rails app

I'm running a Rails app on Heroku, and I'm trying to port over all inline Twitter requests (namely oauth authentication) to a Node.js app, because when Twitter is slow, since the Ruby server is blocking, the Twitter requests clog up my app. (My average request takes about 50ms, but my average Twitter Oauth request takes about 1500ms!) T...

PHP - Maintaining session when redirecting from HTTP to HTTPS?

Hi, I'm working on a simple shopping cart. When the user clicks checkout the URL changes from HTTP to HTTPS. Unfortunately the session does not appear to carry over and I get errors about $_SESSION['cart'] (where I hold the info) not existing. I tried using mod_rewrite to redirect all HTTP to HTTPS so that the session would all be on H...

(ASP classic) Stop/Block execution of rest of code without interrupt Javascript execution

Hi, I am running in an issue similar to the one in this other thread and I'm getting short of ideas so I would really appreciate any help ! Here's the thing : We have an ASP application that uses session variables and has to deal with session merging due to multitabs (IE8). After many many many tries, I've came to the following impl...

ASP.NET session lost but only for one particular user

I have an ASP.NET application that is running on two load balanced servers. Everything is working fine except for one group of customers. All of these customers are coming from the same company. Randomly, an unhandled NullReferenceException error is thrown. It happens at random times in random places. It seems as if the session is j...

cookieless authentication in php5

In my PHP application, I used UserName & Pwd and check the user table in the database to check the validity of users. After the login is successful, I stored the credentials in the Server Session as below: $_SESSION['username'] = $username; $_SESSION['pwd'] = $pwd; And I checked the session to ensure that the user has already logged...

PHP Sessions - User not stored after login.

I am building a basic password protected area on my website and I have a login form. <!-- login.php --> <?php session_start(); ?> <?php if(!empty($_SESSION['user'])) { ?> <form> <input type="text" name="username" /> <input type = "password" name = "password" /> <input type="submit" value = "login" /> <input type="hidden"...

Sessions getting mixed up PHP

Hi we have been operating a system for about 500 users online on one centralized dedicated server. Our application is coded in PHP. Recently when we have a reasonable load of about 100 -150 users sessions start getting mixed up. For instance if a user logins as A after a while his session switches to User B who is also logged in. The sys...

Session is getting overwritten in php

Hi, I am facing a problem that my session is getting overwritten by other logged-in user in php. when we have a reasonable load of about 50 -100 users sessions start getting mixed up. For instance if a user logins as A after a while his session switches to User B who is also logged in. The system has been in operation for over a year a...

Zend_Session uncaught exception

So I have this in my index.php: Zend_Session::start(); Then in one of my controllers in the init method I do: if (false === isset($this->defaultNamespace->tree)) { $this->defaultNamespace->tree = array(); } Which still works. But then in action in the same controller I write this: unset($this->defaultNamespace->tree); // I tri...

Parent - Child relationships in NHibernate

I want to be able to create a parent object with children and let the parent handle the update, saves and deletes. My map classes. ParentMap Id(x => x.Id, "ID").GeneratedBy.Identity(); Map(x => x.Name); HasMany(x => x.Children) .KeyColumn("ParentID") .Inverse() ....

Which PHP Session class should I use?

Hey everyone, I'm looking to do basic stuff with sessions (user logins, authenticated forms & pages) and am just wondering what's the best wrapper/helper class out there to do this. If you have one that you've written or really like that you'd like to share with some snippets, I'd greatly appreciate it. Cheers, ...

Zend framework - Where to Initialize session when the router needs access to it

Hi. I work in a project which uses the session a lot. We have a db handler (the standard one from Zend) and currently i have this initialization (db handler + session start) in a plugin for the preDispatchLoop. Previously it was in preDispatch but because of it being called for each action (included those in the 'forwarded' action, it ca...

Arguments disappear from a dictionary when passed to a function

In my function I read user's data from session and store them in a dictionary. Next I'm sending it to 'register' function from registration.backend but the function somehow get's it empty and a KeyError is thrown. Where are my data gone ? The code from function calling 'register' function : data = request.session['temp_data'] email = da...