title: PHP session locking and using Memcache to store sessions
body: <p>I have a standard html page that has a few img tags, each of these are pointing to a php file on our server. When the php file is loaded, it saves some data to the session before then generating an image.</p>
  <p>This data in the session from each of the scripts is then used in other script further in our application.</p>
  <p>The php file to generate the image starts with session_start and when using the native PHP session handler all seems to work great. Each execution is done correctly and the full session data can be retrieved.</p>
  <p>If I enable memcache to save the sessions then problems start to occur. It would appear that each of the PHP scripts are executed at the same time and thus when saving to the session only the last to execute actually stores any data.</p>
  <p>After further investigation into Memcache I found that the latest stable version does not support session locking, and only in 3.0.4 do they introduce this - <a href="http://pecl.php.net/package/memcache/3.0.4" rel="nofollow noreferrer">http://pecl.php.net/package/memcache/3.0.4</a></p>
  <p>Is it safe to use 3.0.4 when it is only in beta?</p>
  <p>Is there any alternative or a way around this issue in 2.2.7?</p>