session

Any reason to have a session ID within a form?

Hi folks, is there any reason for me to place the session ID within a form, as a hidden form field? Thank you everyone!! :) ...

NHibernate, Databinding to DataGridView, Lazy Loading, and Session managment - need advice

My main application form (WinForms) has a DataGridView, that uses DataBinding and Fluent NHibernate to display data from a SQLite database. This form is open for the entire time the application is running. For performance reasons, I set the convention DefaultLazy.Always() for all DB access. So far, the only way I've found to make this...

Browser simulation - Python

Hi folks, I need to access a few HTML pages through a Python script, problem is that I need COOKIE functionality, therefore a simple urllib HTTP request won't work. Any ideas? ...

php database session handling problem in IE8!

I've got an html page from where Im making this call periodically: function logon(id) { $.get("data.php", { action: 'online', userID: id}, function(data){ $("#msg").html(data); }); } What this does is it calls this SQL script in data.php: $sql = "update user_sessions set expires=(expires + 2) where userID = $userID"; mysql_query(...

struts 2 bean is not created

Hello colleagues! At first some precondition to my question, I'm using struts2 + tiles2 + toplink. NO spring at all. The simplest scenario - is to display list of entities on the page. To optimize resolving JPA's EntityManager I would like to create helper (JPAResourceBean) that implements lazy load of entity manager. For this purposes ...

How to Treat Race Condition of Session in Web Application?

I was in a ASP.NET application has heavy traffic of AJAX requests. Once a user login our web application, a session is created to store information of this user's state. Currently, our solution to keep session data consistent is quite simple and brutal: each request needs to acquire a exclusive lock before being processed. This works f...

PHP: Remove Simple Session with Get-Method

Hello, I want to Remove the Sessions from this php code, actually if someone searches i get this url search.php?searchquery=test but if I reload the page, the results are cleaned. how can I remove the Sessions to get the Results still, if someone reloads the page? this are the codes: search.php <?php session_start(); ?> <form method="...

What is the best way to route a static controller in Rails?

I have a static_controller that is in charge of all the static pages in the site and works as follows in routes.rb: map.connect ':id', :controller => 'static', :action => 'show' I have a static page called about that among other information, has a contact form. I currently have a contacts_controller that is in charge of inserting the ...

How to pass form errors in session or flash? [Rails 2.3.5]

I have a create action for a form that potentially generates errors (i.e. first name is missing) and then redirects. The problem is, that when the redirect happens those form errors get lost. How could I pass those form errors in a session to be displayed back in the original form (which should still be filled out with the previous deta...

Zend_Auth and database session SaveHandler

I have created Zend_Auth adapter implementing Zend_Auth_Adapter_Interface (similar to Pádraic's adapter) and created simple ACL plugin. Everything works fine with default session handler. So far, so good. As a next step I have created custom Session SaveHandler to persist session data in the database. My implementation is very similar t...

PHP: Over-writing session variables

Hi, Question related to PHP memory-handling from someone not yet very experienced in PHP: If I set a PHP session variable of a particular name, and then set a session variable of the exact same name elsewhere (during the same session), is the original variable over-written, or does junk accumulate in the session? In other words, shoul...

Losing sessions with window.open and cakephp redirection in PHP with cakephp

Hi guys, Ok, here goes a very strange problem... Our team is using cakephp to develop a large application. Everything session related is working properly so far. The only issues we've had so far are related to iframes and opening windows in other subdomains. I'll explain: User opens up site A and logs into it, creation a User in...

How to implement Session timeout in Web Server Side?

I beheld a web framework implementing in-memory session in this way. The session object is added to Cache with timeout. When the time is out, the session is removed from Cache automatically. To protect race condition, each request should acquire lock on given session object to proceed. Each request will "touch" the session in Cache to re...

Removing $_SESSION['layout']['action'] globally from all users!

Ok, I am storing a session variable like so to load up users layouts faster if it's set instead of calling the database. But since the layout can be changed via the Administrator, I'd like to be able to globally remove all sessions where $_SESSION['layout']['action'] is set for all users. $_SESSION['layout']['action'] = array(a ton of ...

Can I migrate session data from one browser to another? - Web Development

I need to transfer a user to a page which requires session data which is stored within a different session. Is it possible in some cases to migrate the session data by setting the session cookie on the user's browser? Currently I have no workaround, and using session data seems like the only option I have at the moment. ...

I can not use Session In Page_Load and I got error bellow

hi my dear friends .... why i got this error : Object reference not set to an instance of an object. when i put this code in my page_load.: protected void Page_Load(object sender, EventArgs e) { BackEndUtils.OverallLoader(); string Teststr = Session["Co_ID"].ToString(); } ===========================================...

Hibernate session method to update object

I need this roadmap of a Hibernate managed object instance. First, I create an instance with initial properties and persist this object in a db. Then session associated with this object is closed. But still, I serialize my object and on the next step deserialize it, invoke some setters, and again, I need to update what changed in a data...

Is there any harm in running session_start() multiple times as the page request is being built (in php)?

Presumably there's some tiny performance hit, but beyond that? ...

Understanding CSRF - Simple Question

I know this might make me seem like an idiot, I've read everything there is to read about CSRF and I still don't understand how using a 'challenge token' would add any sort of prevention. Please help me clarify the basic concept, none of the articles and posts here on SO I read seemed to really explicitly state what value you're comparin...

Need to kill a session?

Really quick here... I think I have the answer, but just looking for some validation. I have a site with two "points of entry." One is for a standard user and one is for an admin account. In the real world, an admin could have a standard user account and try to login as an admin while already being under the standard user session. I ...