469,609 Members | 1,732 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

how does the apache server and php interpreter handles request?

Hi all,

I'm wondering how the apache server and php interepreter handles
request.
If one request comes to apache server what is next procedure?
if apache server passes the request to php interepreter and php
interepreter handles?
what if 10 requests comes at same time? apache server forks 10 php
interepreter?
or php interepreter makes 10 threads for each request?

if anybody know please let me know.

Thanks
Jul 17 '05 #1
1 3993
>I'm wondering how the apache server and php interepreter handles
request.
If one request comes to apache server what is next procedure?
if apache server passes the request to php interepreter and php
interepreter handles?
what if 10 requests comes at same time? apache server forks 10 php
interepreter?
If you are using PHP as an Apache module, the PHP interpreter is
in the same process as Apache. There's no such thing as "forks 10
php interpreter". Apache just calls PHP.

If you are using PHP as a CGI (not recommended if you can use it
as a module), it gets invoked as a separate process once per request,
like any other CGI.
or php interepreter makes 10 threads for each request?


Whether Apache itself uses multiple processes or multiple threads
varies with the version of Apache. I believe Apache 1.3.* uses
separate processes, although it (at least the recent ones) re-uses
the processes rather than starting new ones where possible (this
also implies that PHP startup can be re-used as well). Apache 2.*
makes more use of threads.

Gordon L. Burditt
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mike | last post: by
12 posts views Thread by lawrence | last post: by
3 posts views Thread by Joseph S. | last post: by
4 posts views Thread by Simon Johnson | last post: by
8 posts views Thread by krishnakant Mane | last post: by
113 posts views Thread by John Nagle | last post: by
16 posts views Thread by lawrence k | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.