# PHP & IIS - should I use CGI or ISAPI, and what is FastCGI



## adsmith82 (Jul 19, 2006)

I'm installing PHP for IIS and always like to understand my options before making a choice, so I don't really want to continue installation until I know what "web server setup" is best to use. I looked in the PHP documentation, but didn't find, or more likely overlooked, what I was looking for. Can someone help me out? Thanks.

Also, at some point I may use Apache. Why would I choose an Apache "module" or CGI in that situation?


----------



## adsmith82 (Jul 19, 2006)

bump


----------



## Fyzbo (Feb 6, 2002)

Using CGI applications are loaded into memory for each visit. The more visitors the more memory.

ISAPI uses shared memory for all the visitors so you will see improved performance on websites that have a lot of visitors.

I don't know much about FastCGI and how it performs in comparison. My understanding is that it works in the same way as CGI, but loads the app in memory and leaves it there for subsequent visitors giving better performance then basic CGI.


----------



## tomdkat (May 6, 2006)

FastCGI:



> Instead of creating a new process for every request, FastCGI can use a single persistent process which handles many requests over its lifetime.




Peace...


----------

