php-installed

How to: Install PHP on Windows Home Server 2011

If you are like me and prefer hosting your own content on your Home Server using the many varied PHP packages available, then getting PHP working on your server is a must.

Though it’s in beta, I’ve already gone ahead and installed PHP on Vail, and it works! In fact, because the built in website has been completely redesigned, it installs very easily. Only three steps are needed, in fact.

First, you’ll need to head over to http://windows.php.net, and download the “Non-Thread Safe” version of PHP for Windows. Either 5.3 or 5.2 is fine. But note, there are only x86 versions. Don’t worry, whilst Vail is a 64-bit operatong system, they will work perfectly fine. You will need to also download the Visual C++ Redistribution x64 installer, which is linked on the same page. Copy the files to a location accessible by Vail.

Now, use Remote Desktop to access your server (the username is “Administrator” and password is the one you specified). Once you’re into your Vail server, open a command prompt and run this command:

dism /online /enable-feature /featurename:IIS-CGI

This installs the “CGI” component in the web server (IIS) – specifically FastCGI, which is the recommended way to run PHP, and the only supported method for PHP 5.3.x. It also provides better performance than the older methods. This process should take about 10 seconds.

Enable CGI 300x239 How to: Install PHP on Windows Home Server 2011

Now that CGI is installed and enabled, you’ll want to install the Visual C++ Runtime.

VCRedist 1024x817 How to: Install PHP on Windows Home Server 2011

And once that’s done, run the PHP installer. All the defaults are fine, except one. It will ask you about “Web Server Setup”. Select “IIS FastCGI” and continue.

PHP IIS FastCGI 1024x817 How to: Install PHP on Windows Home Server 2011

You’re done. That’s it. Nothing else is needed now. However, if you want to check it out, create a “test.php” file that contains this:

< ?php phpinfo(); ?>

in “C:\Program Files\Windows Server\Bin\WebApps\Site\”. In a web browser of your choice, navigate to “https://{vailserver}/test.php”. You should be greeted with this:

php installed 1024x817 How to: Install PHP on Windows Home Server 2011

And yup. That’s it. Simple, isn’t it? If you’re really insterested in just how difficult it is for WHS v1, check it out here: link

In fact, the only way this could be simpler, is if the Microsoft Web Platform Installer supported Vail. But it didn’t support WHSv1 (even after letting them know how and why), so why would they support Vail? It is a beta after all!


Enjoyed this post? Share it.

If you enjoyed reading this post, then why not share it with your friends and followers?

Sign Up for WGS Daily News

If you don't want to miss out on the latest news from We Got Served, why not subscribe to our daily digest? You'll get the day's headlines and a short summary of each news item delivered straight to your inbox each morning.

, , , , ,

  • nigel

    I installed PHP last week along with Mysql and Phpmyadmin, all went well and currently running a coulple of blogs on Vail. The Microsoft Web Platform Installer would be much easier to use and has alot more to add becides just PHP and Mysql, it works great in 2008 r2 but as you say not in vail. Which is a shame because of the moular way in which it works would be ideal for Vail. I also put a feature request in at Microsoft Connect last week and this is what they said
    "Hi Nigel,

    Thank you for your valuable suggestion.

    We would need to investigate installing these by default with our marketing and legal teams, given that we have similar msft products in aspx and sql server. It is good scenario that we will definitely look into supporting. Given where we are at the moment in the product cycle and due to resource constraints, this is something we can look into for the next version.

    THank you for testing the product and please continue to file bugs.

    Regards,
    Rohita
    Deployment, Windows Home Server team."

    Hopfully we can look forward to it being an out the box feature of Vail.
    Nigel

  • http://intensedebate.com/people/urmaster urmaster

    Excellent, nigels add-in eased the pain of installing PHP and mySQL. I'm currently running a blog and forum off of it. This looks sweet too and is relativity easy but I agree nothing would beat a single deployment like web platform.

  • http://intensedebate.com/people/Drashna Drashna

    Well, it's not that the WPI team didn't know what the problem was or how to fix it for WHSv1 (jim clark and I took care of that… till they stopped responding to us). So it really feels more like they chose not to support WHSv1, which makes me kinda feel like they probably won't support Vail either.

    And right now, it's basically a switch they need to set. If you try to get WPI working, it will install, but only one package will show up. If you use a "install via WPI" link in MS-IE, that's the only way you'll get the "Operating System not supported" dialogue box. Took me a while to figure that out too.

    But ATM moment, Vail is not supported by WPI, and we'll have to wait and see if they change their mind.