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?
While running an infinite loop in PHP on Apache, others pages/scripts would hang (take
Share
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 anothersession_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.