Previously installing versions of PHP on windows server was a breeze using the Web Platform Installer that microsoft very kindly supplied. For some reason known only to themselves they have now discontinued this and you have to install and configure it manually.
Heres how to install it now:
1) Using the Server Manager add from roles fastcgi. Webserver (IIS) > Web Server > Application Development > tick ‘CGI’
2) Open your browser to Windows for PHP Download Page and download the latest PHP non-thread-safe zip package.
3) Download the WinCache extension from the List of Windows Extensions for PHP.
4) Extract all files in the PHP .zip package to a folder of your choice, for example C:\PHP.
5) Extract the WinCache .zip package to the PHP extensions folder (\ext), for example C:\PHP\ext. The WinCache .zip package contains one file (Php_wincache.dll).
6) Open Control Panel, click System and Security, click System, and then click Advanced system settings.
7) In the System Properties window, select the Advanced tab, and then click Environment Variables.
8) Under System variables, select Path, and then click Edit.
9) Add the path to your PHP installation folder to the end of the Variable value, for example ;C:\PHP. Click OK.
10) Open IIS Manager, select the hostname of your computer (not the website) in the Connections panel (this will enable PHP for all your sites), and then double-click Handler Mappings.
11) In the Action panel, click Add Module Mapping.
12) In Request path, type *.php.
13) From the Module menu, select FastCgiModule.
14) In the Executable box, type or browse for the full path to Php-cgi.exe, for example C:\PHP\Php-cgi.exe.
15) In Name, type a name for the module mapping, for example “PHP”.
16) Click OK.
17) Select the hostname of your computer in the Connections panel, and double-click Default Document.
18) In the Action panel, click Add. Type Index.php in the Name box, and then click OK.
19) Click ok
I recommend making a test.php file in your website root along the lines of:
<?php
phpinfo();
?>
and testing that file in your browser to make sure php is installed correctly. Make sure to remove it later.
Leave a Reply
You must be logged in to post a comment.