开发者

Apache mod php and script invocation

Say I am running a PHP script, foo.php, inside apache configured with mod php, then, say I invoke the script from my browser(or any other means), does apache spawn off a new process in which the script gets executed? How does 开发者_开发问答it work? Can someone pls point me to some good article on this?


does apache spawn off a new process in which the script gets executed? How does it work?

No, not each time. With mod_php, each httpd child process will have its own PHP interpreter. When a PHP page is requested, the child process hands off the PHP to the interpreter and sends the output back to the visitor. After the request is finished, the child process remains in memory awaiting another request.

I'm not sure if there are articles that explain the internals of mod_php. This information will be somewhat general to all modules of this type. There are, however, many articles on speed comparisons between mod_php, fastcgi, suphp and others, if this is your concern.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜