how does the apache server and php interpreter handles request?

This is a discussion on how does the apache server and php interpreter handles request? within the PHP Language forums, part of the PHP Programming Forums category; Hi all, I'm wondering how the apache server and php interepreter handles request. If one request comes to apache ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-20-2004
Kim Gijung
 
Posts: n/a
Default 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
Reply With Quote
  #2 (permalink)  
Old 10-20-2004
Gordon Burditt
 
Posts: n/a
Default Re: how does the apache server and php interpreter handles request?

>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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:46 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0