|
Ajaxian Thread "Trouble with Asynchronous Ajax Requests and PHP Sessions", community member Andy, says: "Concurrency issues have long since been solved, if you actually use the recommended methods of avoiding them. Any modern book on threading will give you the basics. With PHP it is especially problematic because each session “variable" is just an array index, and the entire session gets read or written at once, you can not access (or lock) just a single session “variable". But this is hardly a PHP only or AJAX only problem. You would have the same kinds of issues with any series of multiple concurrent requests for the same page (like downloading images on the page that are dynamically generated based on session data). The main issue here is that there are no built-in concurrency controls across multiple requests in popular server-side programming/scripting languages, so you’d have to roll your own. "where I realize "rolling my own session variable storage engine" is exactly what I need. I looked up for a MySQL session storage engine to replace php default sessions handling system, since I was too lazy to code one myself, and I found a class at phpclasses.org called "MySQL Session" that serves the purpose. I've tested the class and it works perfectly fine, thanks to the french coder Julien Pachet. I hope more people will find this useful.
|
| Programming | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||