While running an infinite loop in PHP on Apache, others pages/scripts would hang (take forever to load) until I break execution of the script. However, other pages would still execute on a different user session or browser. Can this be resolved?
This is a race condition problem.
Once you session_start()
a session, a file attached to the session id is opened with restrictive permissions (locked for reading and writing). If another session_start()
is called, it will wait for the session file to be unlocked, to avoid the second script to modify asynchronously the session.
Have a look to this article which explain better than me what's happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With