Installing PHP and FastCGI on Windows Server 2008 Core.

Wednesday, June 18, 2008 9:17
Posted in category Web, Windows Server 2008

First, install the IIS7 Web Server on your Windows Server 2008 Core machine, including the FastCGI and some other (required and optional) components:

Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-CGI;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;WAS-WindowsActivationService;WAS-ProcessModel

Download PHP from the PHP Web Site (http://www.php.net) and extract the files to C:\PHP. Please check if there is a php.ini file in the folder. If not, take the php.ini-recommended file and rename it to php.ini. Then, add the required handlers to your installation. This will tell your IIS Server what to do with PHP files:

AppCmd set config /section:system.webServer/fastCGI /+[fullPath='c:\php\php-cgi.exe']
AppCmd set config /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='c:\php\php-cgi.exe',resourceType='Either']

If you extracted the PHP distribution to another location, please make sure to modify the fullPath and scriptProcessor variables in the previous section.

That’s it! You’re all set and good to go!

You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.