I'm trying to install MediaWiki on a Win2008r2 server, but can't manage to install PHP. Here's what I did:

  • Grabbed a Zip archive of PHP and unzipped it into C:\PHP.
  • Created two subdirs: c:\PHP\sessiondata and c:\PHP\uploadtemp.
  • Granted modify rights to the IUSR account for the subdirs.
  • Copied php.ini-production as php.ini
  • Edited php.ini and made the following changes:

fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0
open_basedir = "c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata"
extension = php_mysql.dll
extension_dir = "./ext"
upload_tmp_dir = C:\PHP\uploadtemp
session.save_path = C:\php\sessiondata

  • Install Web server role, selected CGI and HTTP Redirection options.
  • In the Handler Mappings:

    • Added Module Mapping. Entered the following values:
    • Path = *.php, Module = FastCgiModule, Executable = c:\php\php-cgi.exe, Name = PHP via FastCGI.
  • Created a test page into wwwroot directory: phpinfo.php and set the contents like this:
    < ?php phpinfo(); ?>

  • Browsed to http://localhost/phpinfo.php

But then I get:

HTTP Error 500.0 - Internal Server Error
An unknown FastCGI error occured
    Detailed Error Information
Module: FastCgiModule 
Notification: ExecuteRequestHandler 
Handler: PHP via FastCGI 
Error Code: 0x800736b1 

Requested URL: http://localhost:80/phpinfo.php
Physical Path: C:\inetpub\wwwroot\phpinfo.php 
Logon Method: Anonymous 
Logon User: Anonymous 

Does anyone know what I'm doing wrong here? Thanks.


This is caused by the lack of the VC9 runtime on your machine. You will need to install VC9 runtime from here.

  • This helped me. Before, I checked if VS was installed. And it was. Still installing VC9 again helped solve the problem that I had which was Error 500 "An unknown FastCGI error occured" with error code 0x800736b1. – Chris Nov 17 '15 at 15:07

You've missed out a few steps. The error code: 0x800736b1 suggest the DLL is not found. I don't see anywhere where you've entered the environmental settings?

  • Launch the registry editor: Start => Run => regedit
  • Create a new key named PHP under HKEY_LOCAL_MACHINE\SOFTWARE\
  • Right-click on the newly created key and select New => String Value
  • Name the new value IniFilePath and set the value data to C:\php
  • Click on Start => Settings => Control Panel and double-click the System icon (using the class view).
  • Click on the Advanced system settings link from the left column.
  • From the System Properties window, click on the Advanced tab and then on the Environment - Variables button at the bottom.
  • Select the Path variable from the System Variables section and click on Edit. Add c:\php to your system path (be sure to include the semi-colon separator).

enter image description here

  • After adding this, restart, launch command prompt and type "C:\PHP>php –info". This checks if PHP is picked up correctly.

  • Test your php script


Depending on which PHP version you download for windows (non-thread-safe 64 bit or 32 bit, V9 or V11 compiled), you will need to also download and install the appropriate Visual C++ redistributable app (V9 or V11).

If you had previously installed the module mapping in IIS for FastCGI, you will need to uninstall it and the CGI Role Service (and reboot). After installing VC9 or VC11, reinstall the CGI Role Service (this will include the FastCGI service), and reinstall the CGI module mapping to point to the path to php-cgi.exe.

Next, append the path with the full executable: e.g. ;C:\php\php-cgi.exe. Be sure to include the parenthesis to distinguish the new entry.

Finally, be sure to set the php.ini values as described above, and also set your date.timezone value. You will find the data.timezone acceptable values here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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