We encountered a very strange problem in the office today where PHP’s session_start() function would appear to randomly hang. In the end the problem turned out to be that if you start a session on one script and then that script never completes executing, it will lock the session. So if you try to access the same session from a different script, your script will appear freeze indefinitely.
I am having the same problem, if I send 2 ajax calls directly after each other to my application, the session_start will hang forever
do you know how to solve this problem?
Has somebody solved that problem? I’m driving crazy with that…
The problem can be solved by restarting apache/your web server.
Restarting didn’t help me as deleteing session files also didn’t, deleteing cookies worked just for a few requests. After googling around I’ve found this thread:
http://stackoverflow.com/questions/4333209/session-start-hangs
I’ve just copied the example from http://bg.php.net/session_set_save_handler#example-4189
before calling session_start(); and not it works just fine!