Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

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.