Showing posts with label session. Show all posts
Showing posts with label session. Show all posts

Monday, June 11, 2012

What is the proper way to check for null values?


I love the null-coalescing operator because it makes it easy to assign a default value for nullable types.

Tuesday, May 29, 2012

Sunday, May 20, 2012

What are the risks of PHP sessions?


So everyone says that sessions have security risks, I want to know what kind of risks are these? What can hackers do with sessions?

Friday, May 18, 2012

How to properly handle session and access token with Facebook PHP SDK 3.0?


In the PHP 3.0 SDK there is no getSession() or any session handling from outside the Facebook api available. Some days ago the developers of facebook have also somehow updated the JavaScript sdk, according to this blog entry and this bug report .

Tuesday, May 15, 2012

Has anyone created a PHP Session-like class in user code (not native)?


The native PHP Session functionality is great, but it's ultimately a singleton. There are times when you need to maintain state for multiple apps and in the scope of an already-started session (e.g. in an app framework). Technically one can stop/restart a session after changing session_name() , but this is impractical/impossible/unsafe within most apps. Using a shared session.save_path is also not an option if one app stores session data with a non-disk adapter.

Sunday, May 13, 2012

Why jquery ajax not sending session cookie


I am getting logged out when I send request by ajax in a login session. I check headers sent by FireBug and show there was not cookie

Wednesday, May 9, 2012

Few questions about PHP sessions


I have a few a few question about php sessions:





  1. Since the default value for session.gc_maxlifetime is 24 mins then that means any session file that isn't modified for 24 mins will be deleted and the session will expire automatically.



Monday, May 7, 2012

Thursday, April 12, 2012

Looping Through All a Server"s Sessions in PHP


Is there a way in PHP to get a list of all sessions (and the variables within each) on the server?

Monday, January 30, 2012

Sunday, January 29, 2012

Keep php session from expiring when browser is quit


I'm working with a PHP session. It's working nicely, except if I quit my browser and then return to the webpage, the session has expired. How can I prevent this/set an expiration time for the session?

How to increase the number of something using sessions?


I want the session increase more number every time I click on a button. The problem is I can not get it to increment. Seemed like it get the same value all the time. The script is below.

PHP - Destroy session if not any action in 10 minutes


Is there any option to destroy a session if user does not perform any action in 10 minutes?

Monday, January 16, 2012

Friday, January 13, 2012

Do I need to write a custom session class for CodeIgniter?


I cannot seem to get CI's session library to function the way I want it to. Essentially, I am storing 2 different categories of data within the sessions. The data within the 2 categories may contain the same value. Right now my attempt to add a key => value pair to the session is failing, as it is only allowing 1 key => value pair to be associated with the array. It overrides itself each time I do a post.