1

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?

1 Answer 1

1

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.

3
  • 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, 2011 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, 2011 at 11:04
  • 1
    To answer my own question, using Process Viewer technet.microsoft.com/en-us/sysinternals/bb896653 a separate process is created for each site regardless whether they share the same fcgiext.ini config section.
    – gawpertron
    Nov 1, 2011 at 17:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .