peter schneider;10958303 wrote:If 10 users are logged in and 1 of them runs a sript with a 10 seconds sleep() break in it will that affect the execution of the other 9 users' skripts?
It depends. In this scenario, most likely no. However, your server can only handle so many threads, so letting your users keep them for an unnecessary 10 seconds extra may lead to issues if you increase your numbers from 1 out of 10 to 1k out of 10k users.
You may also get other bad side effects, such as running out of memory, using up your db connections etc, unless you take precaution to release resources before sleeping.
peter schneider;10958303 wrote:
is apache able to process several users' skripts at a time at all or does it process them one after the other?
It does (seem as if it) handles them simultaenously, and you can assume it does. In reality though, one processor can only do one thing at the time. "Multitasking" is achieved by doing a little bit at the time from several tasks, thus achieving this illusion.
What it means for your users is that if I request a page that takes a long time to process right before you request a page that is quick to process, you will have your page before me.
How many simultaenous users your web server can handle depends on both server hardware and the efficiency of your code.