500.21 Internal Server Error with fastcgimodule

As part of the eriecanalny.com project, I want to use mySql as the database. MySql is a php based database system, apparently. But simple php documents fail in localhost with a 500.21 error. The simple solution was to uninstall/reinstall the Windows feature for IIS CGI. Details below.

As I said, I wanted to start working with MySql, but php was not functioning properly on my Vista Business sp2 machine. I discovered that MySql is already ‘installed’ on my laptop (probably as a result of installing SilverLight) though I’ve never used it.

To check if php is functioning,  I created a quick php document, phpinfo.php, containing a single line of code:

<?php phpinfo(); ?>

But when I try to test is in localhost, I get the above 500.21 Internal Server Error Handler such-and-such  has a bad module “FastCgiModule” in its module list.

So, after a couple of hours of hunting, here is the solution for my problem: For me, the IIS module ‘fastcgi’ was missing.

  1. First, figure out if your FastCgiModule is in your IIS.
    1. Open Internet Information Services Manager
    2. Select the uppermost Connection (on the left side)
    3. Double-click the Modules object.Look among the installed modules for ‘FastCgiModule’. For me, it was missing. If your module is there, you can probably stop reading as the rest of this post may not apply to your situation.
  2. So, my ‘FastCgiModule’ was not installed. Who knows why? To install the missing ‘fastcgi’ module, I only needed to uninstall and then reinstall the Windows feature ‘Internet Information Services -> World Wide Web Services -> Application Development Features -> CGI’. Here’s how I did it:
    1. Go to Control Panel
    2. Programs and Functions -> Turn Windows features on or off
    3. Check if CGI is on or off: ‘Internet Information Services -> World Wide Web Services -> Application Development Features -> CGI’
      • If your CGI feature is deselected, select it (put a checkmark in the box).
      • If your CGI feature is already selected, deselect it. Wait. Then after it is uninstalled, select it to reinstall.
  3. That did it for me. I went back into IIS Manager, and checked my Module list again, and this time ‘FastCgiModule’ is listed, and voila, my php pages now work. You may want to also check your Handler Mappings but that would be the subject of another post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>