HTML5 Zone is brought to you in partnership with:

Tim Murphy is a Solutions Architect at PSC Group, LLC (www.psclistens.com). He has been an IT Consultant since 1999 specializing in Microsoft technologies and Software Architecture. Tim is a co-founder of the Chicago Information Technology Architects Group as well as a contributing author of the book The Definitive Guide to the Microsoft Enterprise Library and part of the Influceners program on the geekswithblogs.net site. He has also spoken at the nPlus1 ArcSummit in Chicago, the Chicago Code Camp and has appeared on the Thirsty Developer podcast. Tim is a DZone MVB and is not an employee of DZone and has posted 55 posts at DZone. You can read more from them at their website. View Full User Profile

Beginning PHP On Windows 8

03.27.2013
| 4384 views |
  • submit to reddit

PHP

It is always interesting to find out what technology I will have to work with next.  One of the latest that I’ve had to learn is PHP and since I am running Windows 8 I had to get it working in that environment.  At first I tried just downloading the Apache server files and running that, but then you have to deal with possible collisions between Apache and IIS.  In the end I found out that it is easier to setup PHP for IIS.

The first thing you need to make sure that the IIS feature installed.  Then you install WinCache via the Web Platform Installer.  You will find this by searching for PHP.  This seems to install all of the PHP components but you may need to also install the PHP itself (I was only able to find the Express version in the Web Platform Installer).

image

Fortunately when it comes to PHP the concepts are familiar.  Basically it is the same style of page generation as Classic ASP with a syntax akin to C or Javascript.  The biggest difference that I found is that variables are simply denoted by using a $ and you don’t need to use a format method to insert variables into output.  The code below shows examples of these usages.

<?php

$companyname = "PSC Group";
echo "$companyname PHP Test <br/>";

?>

You can get a quick reference for PHP here.  With these couple of pieces of information you should be able to quickly get started developing PHP sites using your Windows 8 environment.



Published at DZone with permission of Tim Murphy, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)