p. Over at thwartedefforts there’s a “great post”:http://thwartedefforts.org/2006/11/11/race-conditions-with-ajax-and-php-sessions/ about Race Conditions. If you think that’s referring to whether the track is wet or not then this may not be the post you are looking for. However, if you know what “Race Conditions” are and how it applies to AJAX and PHP, you’ll want to read this one. Here’s let’s borrow a quote for you so you can get a feel for it.
bq. One of the problem with race conditions is that it is often difficult to actually witness the ramifications of one when it happens, especially if you are not aware of it. If you’ve used PHP’s built-in, default session handling (that uses files), you’ll never come across the problem. However, things get interesting once you start using session_set_save_handler to write your own session handler.
p. The author, Andy “thwarted” Bakun, does a good job of describing the problem and showing a solution. This is a long and in depth discussion/tutorial. It’s well written and has lots of pretty code for you to scrape and use.
p. Drop by, give “Andy’s work a view”:http://thwartedefforts.org/2006/11/11/race-conditions-with-ajax-and-php-sessions/ and make sure you say howdy while you are there.