Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I seem to be able to run PHP scripts either by mapping .php to IIS directly by using \PHP\php-cgi.exe or through \Windows\system32\inetsrv\fcgiext.dll.

I can't tell the difference between the two methods, other than that by using fcgiext.dll you are given the option to set custom per site configuration for cgi.

Why shouldn't I map php directly to php-cgi.exe?

share|improve this question
up vote 1 down vote accepted

It's massively slower.

fcgiext.dll runs the FastCGI add-in for IIS, which keeps a pool of PHP-CGI processes "hot" (i.e. running), and then feeds requests through them sequentially.

With the other configuration, for each request, a single process is started (which is not fast), processes that one request, and terminates.

Process startup is time consuming on Windows; FastCGI amortizes the cost of process startup/shutdown by running a few in parallel, pushing lots of requests through them, and then terminating them every (think it's something like) 1000 (configurable) requests.

Look up FastCGI on IIS6 for more information.

share|improve this answer
So should I set up a separate config section for each site or can I point every site to the same config section? eg "php:1=phpconfig" and "php:2=phpconfig" – gawpertron Nov 1 '11 at 9:18
I don't know; that seems more like a PHP question, which should be posted as a new question. – TristanK Nov 1 '11 at 11:04
To answer my own question, using Process Viewer a separate process is created for each site regardless whether they share the same fcgiext.ini config section. – gawpertron Nov 1 '11 at 17:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.