i was wondering about an apache reaction with the sleep() function, thus my posting in this section.
it's a theoretical question (I say that to avoid the casual "why you wanna do it anyway?" post).
I have a script. At the end of the script, I want to wait one minute before outputing anything:
what happens if the script is requested by a user and that another user requests the same page? can apache run the two scripts at the same time and let them sleep both for a minute or do you have to wait for a script to be fully executed before it get used by another user?PHP Code:
Same question with variables. The code before the sleep(60) part would treat different variables based on user input. Will it be a problem if a user submits a form with his own input while the script is already sleeping with the variables values of another user who would already have had submitted his form without the result being outputed because of the delay caused by sleep()? In other words: can two scripts be requested at the exact same time and keep store the input of two different users or will the second user erase the values entered by the first user.
i know it sounds awkward... but i hope i'll get some answers anyway