session

Strategy: Unlock document when user leaves a page.

Hi, The current app I'm building is a collaboration app that holds several users in a "team" or company that can access a set of projects. Each project has it's own documents. I want to protect team users from running in to each other and so I have built a system where documents are locked by the first user to access them. The document...

How to pull out data from session in PHP?

I have the following data from print_r ($_SESSION); Array ( [totalprice] => 954 [cart] => Array ( [115] => Array ( [name] => MÅNESKINN [price] => 268.00 [count] => 1 ) [80] => Array ( [name] => DELFINLEK [price] => 268.00 [count] => 1 ) [68] => Array ( ...

PHP session destroyed / lost after header

I've got a script that sets some session values before redirecting to / using header(). I've read many posts about the $_SESSION variable being destroyed / lost after header(), even after I implemented this: // set session here session_regenerate_id(true); session_write_close(); header("Location: /"); session_start() is set in the c...

Webhandler not firing on postback

I have a web application that I upload an image to, the image is subsequently saved to the server's temp folder and displayed via a webhandler on the aspx page. the code for the aspx: <img src="PreviewImageQualityHandler.ashx" alt="Picture not loaded" runat="server" id="imagePreview" /> The code for uploading the picture and adding a...

php: cookie based sessions

does any body have any info/links as to how to integrate a cookie based session system? i've used file/mysql, and am currently using memcached. i wanted to play with apc sessions, but thought i'd give a go at cookies, only i don't know much about it. i imagine i'd have to write my own session handler class? ...

Pass session information from php to python securely? (in agile)

I have a sign up process that is in a legacy framework and we are trying to switch to a new framework...in fact a different language. So let's say that there are 3 steps in the sign up process and each of those 3 steps has it's own file(step1.php, step2.php, step3.php). Now if I want to change page2.php to a python file I will still need...

Should I use Database Sessions or Native PHP File Sessions?

I've just moved over from my own MVC framework to a community supported one (CodeIgniter). I'm just converting my sessions over to the CodeIgniter functions and am noticing that they, by default, store the session data in an encrypted cookie. The alternative they offer are database sessions but not server-side file sessions like the na...

Is it possible to use an existing Facebook Connect session with Facebooker?

Update: Working as designed once I cleared my cookies. Doh! I'm working on an app that for various reasons uses the Facebook Javascript API to initiate a Facebook connect session. I'd like to be able to use that session in a few rails methods using Facebooker. The basic workflow is like this: User goes to non-rails page and logs in t...

PHP Session Id changes between pages

Hi All, I have a problem where i am losing the PHP session between 2 pages. The session_start() is included in a file called session-inc.php into every page requiring a session to be set. This works for all pages on the site except one particular page, member-profile.php. When this page is visited a new session with a different id (s...

What is the best way to create a PHP login page?

I'm fairly new to PHP and am looking for some best practices on how to implement authentication in PHP. I'm an evangelist for Adobe and one of the things that annoys me is when people use Flex/Flash for the login screen. So I want to do a blog post/example on using an HTML/PHP login page and then passing the session information to Flex...

[NHibernate and ASP.NET MVC] How can I implement a robust session-per-request pattern in my project, while focusing on information hiding?

I'm currently building an ASP.NET MVC project, with NHibernate as its persistance layer. For now, some functionnalities have been implemented, but only use local NHibernate sessions: each method that accessed the database (read or write) needs to instanciate its own NHibernate session, with the "using()" directive. The problem is that ...

no test for session key if sent by application

Hi, I'm writing a non browser application using rails as server. As I understand, I need to add the received session key to any successive request. If logged through a browser, it is indeed checked as deleting the cookie during a sesion will fail session test for any request senf afterwards. However, in my application, I can send any ...

php cookies,sessions,mysql

I wound up inheriting a site which seems like it was originally designed to provide access to registered users then decided it wanted public access with the exception of specific restricted features. The access control is decent, however, what's boggling my mind is why anyone would add an entry to their database for each unique visitor....

Scala and Lift and SessionVar that loses it contents

I have SessionVar like this in Lift: object MyObject { object myVar extends SessionVar[Box[MyObject]](Empty) } Then I set value once for myVar: MyObject.myVar(Full(value)) My problem is that after some time (1-5 mins) myVar will lose its value, that is, it will have value Empty again. This is not due inactivity since I am click...

input field value in session variable in php

Can we use input type value in session variable without any form submitting like there is an input field now i want to save above input field value in a $_session['anyname']; when there is no form in page. ...

What is the best way to determine "user logout" on IIS server in C#/Asp.Net?

What is the best way to determine "user logout" on IIS server in C#/Asp.Net? I have an application where the logged in users can initiate long running activities on the server. Those activities need to be terminated when the user logs out. It is not a problem when the user clicks on the logout, but how do I determine that the user ...

How to create Session in Java?

Hi, I am creating a CAPTCHA input using SimpleCaptcha, and did validation of the Captcha input. I am created a captcha input with the following codes. HTML Code: <form action="submit_proceed.do" method="post"> <img src="captchaImg" /><input type="text" name="captcha" value=""><br /> <input type="submit" value="Submit" name="submit" />...

Why would I want an Oracle user without 'create session' privilege?

I just learned that by default, Oracle does not grant the 'create session' privilege to new users. No problem, I can do that myself. Anyway, I'm curious: why would I want an Oracle user without 'create session' privilege? What can it be used for? There must be some non-obvious use. My first thought was running database jobs, but AFAIK t...

Getting changed entities from NHibernate session

Hi all, I wonder if there is a smooth way of keeping track of changed entities using NHibernate. Session.IsDirty() is a fine way of knowing there are changes, but not which. Up to now, I've logged my changes in a List to be able to specify them later on. Eventually I would loop over that list and call Session.Save() on each of them an...

Spring Security - Cannot access my welcome webpage while I'm already logged

Hello, I have a website which uses Spring Security. I have realized that when I am logged in the application and I tried to access the website again without closing this session I get a 404 error. I mean if my application has a context name "myApp" I can acess to localhost:8080/myApp when I am not logged in, but when I am logged in and...