A.L.E.C wrote:

>> There's a race condiction, in session handling. I think I got that with
>> attached patch.
> 
> your patch is not fixing race condition

I think it does. This is what I observed (chronologically):

1. getunread is called, reading session data
2. I click on 'compose'
3. compose session data is being read and written
4. I compose an email, adding a recipient
5. autocomplete is called, reading session data
6. autocomplete's session data is written to databse
7. getunread finishes, writing session data

At that moment 'compose' session data is gone.

What I did is merge existing session data with new session data, instead
of overwriting.


>> Session data is stored serialized(), but not exactly. So I had to create
>> extra unserialize/serialize functions for that.
> 
> But what's the real reason? Why PHP's auto-serialization isn't working? 
> Maybe it's a problem with mysql's TEXT column size described in PHP 
> manual? Change column type to MEDIUMTEXT (ALTER TABLE session MODIFY 
> vars mediumtext NOT NULL) and try then.

php's unserialize() doesn't handle the
'name|serializeddata;othername|serializeddata;' structure.



Robin
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to