php - Laravel 5 Session not persisting reliably -


i love site, able find answers questions until now.

i have 2 ajax transaction process here, in first transaction values entered put session, second transaction retrieves values entered , previous transactions values in order know how proceed. statement not appear reliable, works better 90% of time. why not reliable? transaction completes successfully, , screen appears correctly formatted.

session::put('previous', serialize($entry)); 

example transaction a; user scans item upc, transaction identifies upc 0587 correct, creates $entry, , responds user "please put 0587 tote 3334"

$entry = (object) ['type' => 'upc', 'text' => '0587']; session::put('previous', serialize($entry)); 

example transaction b; users scans tote, transaction identifies tote 3334 correct, asks previous transaction entry

$previous = (object) unserialize(session::get('previous', self::unknown_serial)); 

better 90% of time $previous equals want (upc, 0587). $previous equals values prior transaction before transaction a. $previous equal self::unknown_serial on first transaction after logon.

why session::put(..) appear unreliable?

any appreciated.

turns out serialization issue. changed storage of $entry between these 2 transactions using request::session()->getid(); part of key. has resolved issue. testing showed other instream transactions using same request::session() caused issue.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -