How to install PHP as FastCGI under Apache on Windows 10

by Dani Arlandis — on  ,  , 

FastCGI is a binary protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface (CGI); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests per same amount of time. More info..

1. Download PHP Non Thread Safe version at, once downloaded install Apache, instructions here:

2. Download "mod_fcgid" from the Apachelounge site.

You can find it in the Apache modules section 64 bits or 32 bits

Unzip and copy to Apache/modules folder

3. Add the following options in httpd.conf:

Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper c:/apache/php/php-cgi.exe .php

4 Add these options at the end of httpd.conf:

LoadModule fcgid_module modules/
FcgidInitialEnv PHPRC "C:/Apache/php"

5. Restart Apache service and FastCgi is already activated.


If you want increase timeout for fast cgi proccess add follows lines at the end of httpd.conf

FcgidIOTimeout 3000
FcgidBusyTimeout 3000