Friday, November 21, 2014

How can I install PHP on Windows 8.1?

In order to install PHP on your machine you should have the local web server working which is IIS 8.0 on a Windows 8 OS.  if it is not activated you can activate it from Control Panel (Turn Windows features on or off ).

If the IIS 8.0 is activated you should be able to see the following screen when you access  http://localhost in  browser on your computer.

For the current laptop the following is the response:

Assuming you had no problem activating IIS 8.0 we can move to the next step of installing PHP 5.x.

Downloading and installing PHP 5.X:

PHP can be downloaded (free) using the latest Web Platform Installer (WebPI) which happens to be WebPI version 5.0 from here:

The advantage of using the WebPI is that it not only it installs PHP engine but also configures it to work with IIS.

Downloading and installing is quite easy as shown in the following post:

After installing PHP engine you should test to verify it is working correctly by browsing the info.php file shown next from the following file location:


Here is the simple code listing for info.php:

If your PHP engine is working well you should see the following (only part of a very long page is shown) when you browse this file in your IIS or type the following in the address box of your browser.
This completes the installation of PHP 5.6 on Windows 8.1 Professional that works well with IIS 8.0

In a future post we take a look at accessing SQL Server 2012 from a PHP application.

Related must read article:
I have covered in detail how to use PHP applications (PHP versions 5.2.4 or later) to access data on Microsoft Azure SQL Databases (formerly called  Microsoft SQL Azure) using PHP Data Objects. Details are on pages 369-373, Chapter 10 in my 2010 book here:

You can buy or join the library here:



No comments: