session

How to access session variables from a second php file?

As part of my attempt to create an ASP.net that has the same look and feel as an existing php application from another developer. (more about it can you read here: http://stackoverflow.com/questions/2544389/how-to-share-sessions-between-php-and-asp-net-application) I'm in the middle of the process of sharing userlogin state between my AS...

Rails - User Session Control using Webservice instead ActiveRecord

Hello there, I'm trying to find some cool and nice way to manage the session control of my application, just like authologic, clearance. But the issue is that I don't have a database, all the users are stored in a external webservice and the Login function is basically call the LoginDB(user,password, salt) and then it returns true or fal...

How to create a session variable if none exists prior, but ignore if variable exists but is blank

Hey Guys, I have this problem. I want to detect if there is not a session variable and create one, but if one already exists and is empty I want to leave it alone. Say I have this to create my session variable if none is detected: if (!$_SESSION['second_prefix']){$_SESSION['second_prefix'] = "";} How should I change this to not perf...

How to destroy the php session with one button

I'd like to make a simple form button which completely destroys the session when you click on it. I am just starting to use PHP for the first time, and do not see how I implement it into my HTML code. What I'd like is simply a form button which will clear the session (and possibly an explanation as to how it works) ...

session data not being written to database

The site I'm renovating writes session data to their database using the session_set_save_handler function as follows: session_set_save_handler (array(&$ses_class, '_open'), array(&$ses_class, '_close'), array(&$ses_class, '_read'), array(&$ses_class, '_writ...

SilverLight Enabled Wcf Service - can't keep track of session

Hi, I'm new to Silverlight and WCF services. I'm trying to write a client application that can manipulate an object server side. My problem is that each time my Silverlight client makes a call to the service, it enters into the constructor systematically public SilverLightEnabledWcfService() { } In the below exampl...

Android app remain logged into website, cookies? Session?

I'm looking to make an android app that is basically a custom view of a text based gaming website. I know how to do HttpPosting and such, so sending login information is relatively simple. But my question is, how would I go about then navigating the site? I've never really worked with sessions and cookies on the client side. Is a cookie ...

Setting cookie expiration with ASP classic to ASP.NET session sharing solution

I'm implementing the session sharing structure from this link for an ASP classic site to begin the gradual conversion process to ASP.NET. I'm trying to extend the cookie expiration time so that users do not get signed out of the site when the session expires. At the place where the cookie is created in SessionPage.cs I've added the line ...

Spring 3 - How to configure sessions persistence properly ?

I have session persistence configured in Jetty. Simple example with Spring Security and jsp page works fine. Session is restored after server restart, I'm still authenticated. But after using EntityManager and some Spring components I get an axception on startup : java.lang.IllegalStateException: Cannot deserialize BeanFactory with id o...

IHttpHandler null session (on some servers)

Hello, I have an IHttpHandler that implements IRequiresSessionState. Everything works fine on most servers but there are 2 servers (one IIS 7.0 and one IIS 7.5) that give me null sessions. Aspx pages are fine on every server. I've searched for hours and failed to find anything that is not related to IRequiresSessionState. ...

Paypal IPN how to get current session

I want to get my previous $_SESSION['cart'] to the Paypal IPN Sample of IPN Code I use. Everything working fine and script got the $_POST data from Paypal. if (strcmp ($res, "VERIFIED") == 0) { $subject = time(); $to = '[email protected]'; foreach ($_POST as $key => $value) { $body .= "\n$key: $value"; ...

SessionTimeout: web.xml vs session.maxInactiveInterval().

I'm trying to timeout an HttpSession in java. My container is weblogic. Currently, we have our session timeout set in the web.xml file, like this <session-config> <session-timeout>15</session-timeout> </session-config> Now, i'm being told that this will terminate the session (or is it all sessions?) in the 15th minute of use,...

Stick to my REST guns or break statelessness? Advice needed

Dear Abby, I wrote a RESTful servlet, and the UI developer wants to save the logged-in state on the server. He made this strange claim: "I haven't encountered a production REST implementation that is pure REST. The ones I've seen all have had the server maintain a session." I find this difficult to accept. First there's the technic...

Protecting images in ASP.NET MVC (w/ custom RouteHandler)

I created a custom RouteHandler for images that I want protected. My RouteHandler simply takes a new route (graphics/{filename}) and does a lookup for the true file path, sets the mime type, and serves it up. That works fine. (http://www.mikesdotnetting.com/Article/126/ASP.NET-MVC-Prevent-Image-Leeching-with-a-Custom-RouteHandler) Wh...

PHP session_start() question?

can I include my session_start() in my header include or should I past session_start() in every pages? Is there any pros or cons in pasting the session_start() in the header include? ...

Will creating new array clear the whole php session data?

Code below: $_SESSION = array(); Will it clear all session data? If I wouldn't want to use session_destory(). ...

[CakePHP] SQL query in session

hi all, i want to develop search system in my cakephp application, by adding extra functionality in controller, and it works fine. as you probably guess, after search and viewing record, when i return to index (list) page, i have all results from proper model, and search result is "forgotten". so i guess that i have to keep my sql que...

Dealing with session hijacking in PHP

Reading through the many questions regarding session hijacking here on Stackoverflow, I've gathered that the only 'solution' to validating a users session is by checking the user agent, which is such a weak layer of protection that I don't even bother to implement it. So, I was wondering what solutions you guys have implemented? Are you...

CodeIgniter session help, cookies not secure?

I'm just getting into learning about sessions, and for my purposes, I want to create something that upon every request from the client, the server authenticates that user, and only then performs data-handling for that user. However, I have seen a lot of examples with CodeIgniter where the session is set up as thus: $this->load->library...

$_SESSION['userid'] works in one function and not the next

Hi. I can't understand why this don't work. First i have a function like this where the user name shows up: if(isset($_POST['Commit'])){ if(empty($_POST['crime'])){ echo "You didn't select the type of crime you wish to do."; }else{ (...lots of code) $name = $_SESSION['username'];` Then I have another function where the username ...