Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


sessions being overritten by ajax call


sessions being overritten by ajax call  using -'php,ajax,session,zend-framework'

I've got an issue with sessions (we're using Zend (version 1) and storing the sessions in the database, but I don't know if that's important for this or not).

We store some session data, and work with that, everything is fine.

$session = new Zend_Session_Namespace('Customer');
$session->customerId = $someThing->getCustomerId();


Whilst this is going on, we have an AJAX script that is running every X seconds in the background, and sometimes takes a few seconds to finish. The problem happens when:


Ajax call starts (with session data existing).
User loads up a different customer, and the session data is changed.
The AJAX call finishes, and the session data is reverted to the previous customer ID.


In our AJAX script, the first thing we do is call session_write_close();, as the AJAX doesn't care about the session data, but this issue still happens.

Are there any other methods we could do to help stop this from happening?
    

asked Oct 23, 2015 by abhimca2006
0 votes
0 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...