Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm trying to run PHP as FastCGI with no success.

I made a *.conf file such on mod_fcgid page but without a wrapper script.

Here is my conf:

# php5 as FastCGI executable
FcgidMaxRequestsPerProcess 10000

# Uncomment the following line if cgi.fix_pathinfo is set to 1 in
# php.ini:
# FcgidFixPathinfo 1

<Location "D:/www">
    AddHandler fcgid-script .php
    Options +ExecCGI
    FcgidWrapper "C:/php/php-cgi.exe" .php

    # Customize the next two directives for your requirements.
    Order allow,deny
    Allow from all

The server start normally and fcgid_module is shown with httpd -M, but php files are server as plain text.

share|improve this question

Out of curiosity, try changing your line:

AddHandler fcgid-script .php


AddHandler fcgid-script php

In order to get yourself up and running, you might also want to consider using mod_fastcgi (note, not mod_fcgid from Apache). A dll is available here Note that this is for Httpd 2.2. (A dll for 2.4 is also available.)

Your config entry would look something like:

LoadModule fcgid_module modules/
<IfModule mod_fastcgi.c>
    Alias /fcgi-bin "C:/www/cgi-bin"
    FastCgiServer "C:/www/cgi-bin/php-cgi.exe" -initial-env PATH=C:/php -initial-env PHPRC=C:/php
    AddHandler php-fastcgi .php
    <Location /fcgi-bin/>
        Options ExecCGI
        SetHandler php-fastcgi
    AddType application/x-httpd-fastphp .php
    Action php-fastcgi /fcgi-bin/php-cgi.exe

You can probably get away with less, but it works for me on windows.

share|improve this answer

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.