Friday, October 29, 2010

Strange Session problem

Hi

I've just encountered a really strange problem on one of our
production sites. This is the scenario:

We have a reporting page where a user can put in search criteria.
Those search criteria are saved in the session, and the data is
returned. Then the user can download the report. The download action
uses the search criteria from the session and returns the report.

This code works in production on 3 different sites, but this week one
(after an upgrade) the problem started (only on one site). The code is
identical as is the database schema, but for some reason, the session
data gets lost between the requests. The rest of the session stays
intact. So far I've noticed that the session is there even when the
view gets displayed, however at the next request in beforeFilter the
session has lost the report search data. I've put it in code here:

getReport()
...
$this->Session->write('Report',$search);

downloadReport()
if (!$this->Session->read('Report')) {
return;
}

The closest i've come is deleting a whole bunch of records from the
user table in the offending setup. That helped, but i'm not yet sure
why and which records. Does anybody have a clue why this would happen?
It seems to me the data is dropped at the beginning of the
downloadReport request for some unknown reason!?

Any help would be much appreciated.
Nico

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: